Home
last modified time | relevance | path

Searched refs:bytes (Results 1 – 25 of 43) sorted by relevance

12

/dalvik/dx/src/com/android/dx/cf/direct/
DDirectClassFile.java88 private final ByteArray bytes; field in DirectClassFile
181 public DirectClassFile(ByteArray bytes, String filePath, in DirectClassFile() argument
183 if (bytes == null) { in DirectClassFile()
192 this.bytes = bytes; in DirectClassFile()
208 public DirectClassFile(byte[] bytes, String filePath, in DirectClassFile() argument
210 this(new ByteArray(bytes), filePath, strictParse); in DirectClassFile()
250 return bytes; in getBytes()
377 return new DcfTypeList(bytes, offset, size, pool, observer); in makeTypeList()
387 return bytes.getInt(0); in getMagic0()
397 return bytes.getUnsignedShort(4); in getMinorVersion0()
[all …]
DStdAttributeFactory.java227 ByteArray bytes = cf.getBytes(); in bootstrapMethods() local
228 int numMethods = bytes.getUnsignedShort(offset); in bootstrapMethods()
230 observer.parsed(bytes, offset, 2, in bootstrapMethods()
237 BootstrapMethodsList methods = parseBootstrapMethods(bytes, cf.getConstantPool(), in bootstrapMethods()
252 ByteArray bytes = cf.getBytes(); in code() local
254 int maxStack = bytes.getUnsignedShort(offset); // u2 max_stack in code()
255 int maxLocals = bytes.getUnsignedShort(offset + 2); // u2 max_locals in code()
256 int codeLength = bytes.getInt(offset + 4); // u4 code_length in code()
260 observer.parsed(bytes, offset, 2, in code()
262 observer.parsed(bytes, offset + 2, 2, in code()
[all …]
DMemberListParser.java118 ByteArray bytes = cf.getBytes(); in getCount() local
119 return bytes.getUnsignedShort(offset); in getCount()
177 ByteArray bytes = cf.getBytes(); in parse() local
181 observer.parsed(bytes, offset, 2, in parse()
187 int accessFlags = bytes.getUnsignedShort(at); in parse()
188 int nameIdx = bytes.getUnsignedShort(at + 2); in parse()
189 int descIdx = bytes.getUnsignedShort(at + 4); in parse()
194 observer.startParsingMember(bytes, at, name.getString(), in parse()
196 observer.parsed(bytes, at, 0, "\n" + humanName() + in parse()
199 observer.parsed(bytes, at, 2, in parse()
[all …]
DCodeObserver.java40 private final ByteArray bytes; field in CodeObserver
51 public CodeObserver(ByteArray bytes, ParseObserver observer) { in CodeObserver() argument
52 if (bytes == null) { in CodeObserver()
60 this.bytes = bytes; in CodeObserver()
67 observer.parsed(bytes, offset, length, header(offset)); in visitInvalid()
73 observer.parsed(bytes, offset, length, header(offset)); in visitNoArgs()
94 observer.parsed(bytes, offset, length, in visitLocal()
142 observer.parsed(bytes, offset, length, in visitConstant()
151 observer.parsed(bytes, offset, length, in visitBranch()
179 observer.parsed(bytes, offset, length, sb.toString()); in visitSwitch()
[all …]
DAttributeFactory.java82 ByteArray bytes = cf.getBytes(); in parse() local
84 int nameIdx = bytes.getUnsignedShort(offset); in parse()
85 int length = bytes.getInt(offset + 2); in parse()
90 observer.parsed(bytes, offset, 2, in parse()
92 observer.parsed(bytes, offset + 2, 4, in parse()
124 ByteArray bytes = cf.getBytes(); in parse0() local
126 Attribute result = new RawAttribute(name, bytes, offset, length, pool); in parse0()
129 observer.parsed(bytes, offset, length, "attribute data"); in parse0()
DClassPathOpener.java67 boolean processFileBytes(String name, long lastModified, byte[] bytes); in processFileBytes() argument
168 byte[] bytes = FileUtils.readFile(file); in processOne()
169 return consumer.processFileBytes(path, file.lastModified(), bytes); in processOne()
269 final byte[] bytes; in processArchive()
280 bytes = baos.toByteArray(); in processArchive()
282 bytes = new byte[0]; in processArchive()
285 any |= consumer.processFileBytes(path, one.getTime(), bytes); in processArchive()
/dalvik/dx/src/com/android/dx/rop/cst/
DCstString.java37 private final ByteArray bytes; field in CstString
48 byte[] bytes = new byte[len * 3]; // Avoid having to reallocate. in stringToUtf8Bytes()
54 bytes[outAt] = (byte) c; in stringToUtf8Bytes()
57 bytes[outAt] = (byte) (((c >> 6) & 0x1f) | 0xc0); in stringToUtf8Bytes()
58 bytes[outAt + 1] = (byte) ((c & 0x3f) | 0x80); in stringToUtf8Bytes()
61 bytes[outAt] = (byte) (((c >> 12) & 0x0f) | 0xe0); in stringToUtf8Bytes()
62 bytes[outAt + 1] = (byte) (((c >> 6) & 0x3f) | 0x80); in stringToUtf8Bytes()
63 bytes[outAt + 2] = (byte) ((c & 0x3f) | 0x80); in stringToUtf8Bytes()
69 System.arraycopy(bytes, 0, result, 0, outAt); in stringToUtf8Bytes()
79 public static String utf8BytesToString(ByteArray bytes) { in utf8BytesToString() argument
[all …]
/dalvik/dexgen/src/com/android/dexgen/rop/cst/
DCstUtf8.java36 private final ByteArray bytes; field in CstUtf8
48 byte[] bytes = new byte[len * 3]; // Avoid having to reallocate. in stringToUtf8Bytes()
54 bytes[outAt] = (byte) c; in stringToUtf8Bytes()
57 bytes[outAt] = (byte) (((c >> 6) & 0x1f) | 0xc0); in stringToUtf8Bytes()
58 bytes[outAt + 1] = (byte) ((c & 0x3f) | 0x80); in stringToUtf8Bytes()
61 bytes[outAt] = (byte) (((c >> 12) & 0x0f) | 0xe0); in stringToUtf8Bytes()
62 bytes[outAt + 1] = (byte) (((c >> 6) & 0x3f) | 0x80); in stringToUtf8Bytes()
63 bytes[outAt + 2] = (byte) ((c & 0x3f) | 0x80); in stringToUtf8Bytes()
69 System.arraycopy(bytes, 0, result, 0, outAt); in stringToUtf8Bytes()
79 public static String utf8BytesToString(ByteArray bytes) { in utf8BytesToString() argument
[all …]
/dalvik/dexgen/src/com/android/dexgen/util/
DByteArray.java31 private final byte[] bytes; field in ByteArray
48 public ByteArray(byte[] bytes, int start, int end) { in ByteArray() argument
49 if (bytes == null) { in ByteArray()
61 if (end > bytes.length) { in ByteArray()
65 this.bytes = bytes; in ByteArray()
75 public ByteArray(byte[] bytes) { in ByteArray() argument
76 this(bytes, 0, bytes.length); in ByteArray()
98 return new ByteArray(bytes, start + this.start, end + this.start); in slice()
111 public int underlyingOffset(int offset, byte[] bytes) { in underlyingOffset() argument
112 if (bytes != this.bytes) { in underlyingOffset()
[all …]
DOutput.java95 public void write(ByteArray bytes); in write() argument
105 public void write(byte[] bytes, int offset, int length); in write() argument
113 public void write(byte[] bytes); in write() argument
/dalvik/dx/src/com/android/dx/util/
DByteArray.java32 private final byte[] bytes; field in ByteArray
49 public ByteArray(byte[] bytes, int start, int end) { in ByteArray() argument
50 if (bytes == null) { in ByteArray()
62 if (end > bytes.length) { in ByteArray()
66 this.bytes = bytes; in ByteArray()
76 public ByteArray(byte[] bytes) { in ByteArray() argument
77 this(bytes, 0, bytes.length); in ByteArray()
99 byte[] slicedOut = Arrays.copyOfRange(bytes, start, end); in slice()
209 System.arraycopy(bytes, start, out, offset, size); in getBytes()
233 return bytes[start + off]; in getByte0()
[all …]
DOutput.java98 public void write(ByteArray bytes); in write() argument
108 public void write(byte[] bytes, int offset, int length); in write() argument
116 public void write(byte[] bytes); in write() argument
/dalvik/dx/src/com/android/dx/command/dump/
DClassDumper.java39 public static void dump(byte[] bytes, PrintStream out, in dump() argument
42 new ClassDumper(bytes, out, filePath, args); in dump()
50 private ClassDumper(byte[] bytes, PrintStream out, in ClassDumper() argument
52 super(bytes, out, filePath, args); in ClassDumper()
59 byte[] bytes = getBytes(); in dump()
60 ByteArray ba = new ByteArray(bytes); in dump()
69 if (readBytes != bytes.length) { in dump()
70 parsed(ba, readBytes, bytes.length - readBytes, "<extra data at end of file>"); in dump()
DBlockDumper.java80 public static void dump(byte[] bytes, PrintStream out, in dump() argument
82 BlockDumper bd = new BlockDumper(bytes, out, filePath, in dump()
91 BlockDumper(byte[] bytes, PrintStream out, String filePath, in BlockDumper() argument
93 super(bytes, out, filePath, args); in BlockDumper()
106 byte[] bytes = getBytes(); in dump()
107 ByteArray ba = new ByteArray(bytes); in dump()
135 public void parsed(ByteArray bytes, int offset, int len, String human) { in parsed() argument
137 super.parsed(bytes, offset, len, human); in parsed()
151 public void startParsingMember(ByteArray bytes, int offset, String name, in startParsingMember() argument
167 parsed(bytes, offset, 0, "\n"); in startParsingMember()
[all …]
DMain.java91 byte[] bytes = FileUtils.readFile(name); in run()
95 src = new String(bytes, "utf-8"); in run()
99 bytes = HexParser.parse(src); in run()
101 processOne(name, bytes); in run()
119 private void processOne(String name, byte[] bytes) { in processOne() argument
121 DotDumper.dump(bytes, name, parsedArgs); in processOne()
123 BlockDumper.dump(bytes, System.out, name, false, parsedArgs); in processOne()
125 BlockDumper.dump(bytes, System.out, name, true, parsedArgs); in processOne()
129 SsaDumper.dump(bytes, System.out, name, parsedArgs); in processOne()
131 ClassDumper.dump(bytes, System.out, name, parsedArgs); in processOne()
DBaseDumper.java37 private final byte[] bytes; field in BaseDumper
84 public BaseDumper(byte[] bytes, PrintStream out, in BaseDumper() argument
86 this.bytes = bytes; in BaseDumper()
132 public void parsed(ByteArray bytes, int offset, int len, String human) { in parsed() argument
133 offset = bytes.underlyingOffset(offset); in parsed()
144 public void startParsingMember(ByteArray bytes, int offset, String name, in startParsingMember() argument
151 public void endParsingMember(ByteArray bytes, int offset, String name, in endParsingMember() argument
171 return bytes; in getBytes()
252 return Hex.dump(bytes, offset, len, offset, hexCols, 4); in hexDump()
DDotDumper.java45 private final byte[] bytes; field in DotDumper
52 static void dump(byte[] bytes, String filePath, Args args) { in dump() argument
53 new DotDumper(bytes, filePath, args).run(); in dump()
56 DotDumper(byte[] bytes, String filePath, Args args) { in DotDumper() argument
57 this.bytes = bytes; in DotDumper()
66 ByteArray ba = new ByteArray(bytes); in run()
98 public void parsed(ByteArray bytes, int offset, int len, String human) { in parsed() argument
104 public void startParsingMember(ByteArray bytes, int offset, String name, in startParsingMember() argument
110 public void endParsingMember(ByteArray bytes, int offset, String name, in endParsingMember() argument
/dalvik/dx/src/com/android/dx/cf/cst/
DConstantPoolParser.java60 private final ByteArray bytes; field in ConstantPoolParser
83 public ConstantPoolParser(ByteArray bytes) { in ConstantPoolParser() argument
84 int size = bytes.getUnsignedShort(8); // constant_pool_count in ConstantPoolParser()
86 this.bytes = bytes; in ConstantPoolParser()
138 observer.parsed(bytes, 8, 2, in parse()
140 observer.parsed(bytes, 10, 0, "\nconstant_pool:"); in parse()
175 observer.parsed(bytes, offset, nextOffset - offset, human); in parse()
179 observer.parsed(bytes, endOffset, 0, "end constant_pool"); in parse()
192 int tag = bytes.getUnsignedByte(at); in determineOffsets()
219 at += bytes.getUnsignedShort(at + 1) + 3; in determineOffsets()
[all …]
/dalvik/dx/src/com/android/dex/util/
DByteArrayByteInput.java21 private final byte[] bytes; field in ByteArrayByteInput
24 public ByteArrayByteInput(byte... bytes) { in ByteArrayByteInput() argument
25 this.bytes = bytes; in ByteArrayByteInput()
30 return bytes[position++]; in readByte()
/dalvik/dx/src/com/android/dx/cf/code/
DBytecodeArray.java43 private final ByteArray bytes; field in BytecodeArray
58 public BytecodeArray(ByteArray bytes, ConstantPool pool) { in BytecodeArray() argument
59 if (bytes == null) { in BytecodeArray()
67 this.bytes = bytes; in BytecodeArray()
77 return bytes; in getBytes()
86 return bytes.size(); in size()
97 return 4 + bytes.size(); in byteLength()
107 int sz = bytes.size(); in forEach()
127 int sz = bytes.size(); in getInstructionOffsets()
223 int opcode = bytes.getUnsignedByte(offset); in parseInstruction()
[all …]
/dalvik/dx/tests/034-dex-minimal/
Dexpected.txt64 | header: 1 item; 112 bytes total
65 | 112 bytes/item
66 | map list: 1 item; 28 bytes total
67 | 28 bytes/item
/dalvik/dx/src/com/android/dx/cf/iface/
DParseObserver.java43 public void startParsingMember(ByteArray bytes, int offset, String name, in startParsingMember() argument
56 public void endParsingMember(ByteArray bytes, int offset, String name, in endParsingMember() argument
67 public void parsed(ByteArray bytes, int offset, int len, String human); in parsed() argument
/dalvik/dexgen/src/com/android/dexgen/dex/file/
DDexFile.java606 private static void calcSignature(byte[] bytes) { in calcSignature() argument
615 md.update(bytes, 32, bytes.length - 32); in calcSignature()
618 int amt = md.digest(bytes, 12, 20); in calcSignature()
634 private static void calcChecksum(byte[] bytes) { in calcChecksum() argument
637 a32.update(bytes, 12, bytes.length - 12); in calcChecksum()
641 bytes[8] = (byte) sum; in calcChecksum()
642 bytes[9] = (byte) (sum >> 8); in calcChecksum()
643 bytes[10] = (byte) (sum >> 16); in calcChecksum()
644 bytes[11] = (byte) (sum >> 24); in calcChecksum()
/dalvik/dx/src/com/android/dx/cf/attrib/
DAttBootstrapMethods.java39 int bytes = ATTRIBUTE_HEADER_BYTES + bootstrapMethods.size() * BOOTSTRAP_METHOD_BYTES; in AttBootstrapMethods() local
42 bytes += numberOfArguments * BOOTSTRAP_ARGUMENT_BYTES; in AttBootstrapMethods()
44 this.byteLength = bytes; in AttBootstrapMethods()
/dalvik/dx/tests/139-lambda-metafactory/
Dexpected.txt843 | annotation: 2 items; 22 bytes total
844 | 8..14 bytes/item; average 11
845 | annotation set: 2 items; 16 bytes total
846 | 8 bytes/item
847 | annotations directory: 1 item; 24 bytes total
848 | 24 bytes/item
849 | call site id: 1 item; 4 bytes total
850 | 4 bytes/item
851 | class data: 3 items; 43 bytes total
852 | 8..21 bytes/item; average 14
[all …]

12