/dalvik/dx/src/com/android/dx/cf/direct/ |
D | DirectClassFile.java | 83 private final ByteArray bytes; field in DirectClassFile 176 public DirectClassFile(ByteArray bytes, String filePath, in DirectClassFile() argument 178 if (bytes == null) { in DirectClassFile() 187 this.bytes = bytes; in DirectClassFile() 203 public DirectClassFile(byte[] bytes, String filePath, in DirectClassFile() argument 205 this(new ByteArray(bytes), filePath, strictParse); in DirectClassFile() 236 return bytes; in getBytes() 339 return new DcfTypeList(bytes, offset, size, pool, observer); in makeTypeList() 349 return bytes.getInt(0); in getMagic0() 359 return bytes.getUnsignedShort(4); in getMinorVersion0() [all …]
|
D | StdAttributeFactory.java | 217 ByteArray bytes = cf.getBytes(); in code() local 219 int maxStack = bytes.getUnsignedShort(offset); // u2 max_stack in code() 220 int maxLocals = bytes.getUnsignedShort(offset + 2); // u2 max_locals in code() 221 int codeLength = bytes.getInt(offset + 4); // u4 code_length in code() 225 observer.parsed(bytes, offset, 2, in code() 227 observer.parsed(bytes, offset + 2, 2, in code() 229 observer.parsed(bytes, offset + 4, 4, in code() 244 new BytecodeArray(bytes.slice(codeOffset, codeOffset + codeLength), in code() 251 int exceptionTableLength = bytes.getUnsignedShort(offset); in code() 257 observer.parsed(bytes, offset, 2, in code() [all …]
|
D | MemberListParser.java | 118 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 …]
|
D | AttributeFactory.java | 82 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()
|
D | CodeObserver.java | 43 private final ByteArray bytes; field in CodeObserver 54 public CodeObserver(ByteArray bytes, ParseObserver observer) { in CodeObserver() argument 55 if (bytes == null) { in CodeObserver() 63 this.bytes = bytes; in CodeObserver() 69 observer.parsed(bytes, offset, length, header(offset)); in visitInvalid() 74 observer.parsed(bytes, offset, length, header(offset)); in visitNoArgs() 94 observer.parsed(bytes, offset, length, in visitLocal() 141 observer.parsed(bytes, offset, length, in visitConstant() 149 observer.parsed(bytes, offset, length, in visitBranch() 176 observer.parsed(bytes, offset, length, sb.toString()); in visitSwitch() [all …]
|
/dalvik/dexgen/src/com/android/dexgen/rop/cst/ |
D | CstUtf8.java | 36 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/dx/src/com/android/dx/rop/cst/ |
D | CstString.java | 37 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/dx/src/com/android/dx/util/ |
D | ByteArrayByteInput.java | 21 private final byte[] bytes; field in ByteArrayByteInput 24 public ByteArrayByteInput(byte... bytes) { in ByteArrayByteInput() argument 25 this.bytes = bytes; in ByteArrayByteInput() 29 return bytes[position++]; in readByte()
|
D | ByteArray.java | 31 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 …]
|
D | Output.java | 95 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/dexgen/src/com/android/dexgen/util/ |
D | ByteArray.java | 31 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 …]
|
D | Output.java | 95 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/command/dump/ |
D | ClassDumper.java | 40 public static void dump(byte[] bytes, PrintStream out, in dump() argument 43 new ClassDumper(bytes, out, filePath, args); in dump() 51 private ClassDumper(byte[] bytes, PrintStream out, in ClassDumper() argument 53 super(bytes, out, filePath, args); in ClassDumper() 60 byte[] bytes = getBytes(); in dump() 61 ByteArray ba = new ByteArray(bytes); in dump() 70 if (at != bytes.length) { in dump() 71 parsed(ba, at, bytes.length - at, "<extra data at end of file>"); in dump()
|
D | BlockDumper.java | 82 public static void dump(byte[] bytes, PrintStream out, in dump() argument 84 BlockDumper bd = new BlockDumper(bytes, out, filePath, in dump() 93 BlockDumper(byte[] bytes, PrintStream out, String filePath, in BlockDumper() argument 95 super(bytes, out, filePath, args); in BlockDumper() 108 byte[] bytes = getBytes(); in dump() 109 ByteArray ba = new ByteArray(bytes); in dump() 137 public void parsed(ByteArray bytes, int offset, int len, String human) { in parsed() argument 139 super.parsed(bytes, offset, len, human); in parsed() 153 public void startParsingMember(ByteArray bytes, int offset, String name, in startParsingMember() argument 165 setAt(bytes, offset); in startParsingMember() [all …]
|
D | Main.java | 88 byte[] bytes = FileUtils.readFile(name); in main() 92 src = new String(bytes, "utf-8"); in main() 96 bytes = HexParser.parse(src); in main() 98 processOne(name, bytes); in main() 116 private static void processOne(String name, byte[] bytes) { in processOne() argument 118 DotDumper.dump(bytes, name, parsedArgs); in processOne() 120 BlockDumper.dump(bytes, System.out, name, false, parsedArgs); in processOne() 122 BlockDumper.dump(bytes, System.out, name, true, parsedArgs); in processOne() 126 SsaDumper.dump(bytes, System.out, name, parsedArgs); in processOne() 128 ClassDumper.dump(bytes, System.out, name, parsedArgs); in processOne()
|
D | BaseDumper.java | 38 private final byte[] bytes; field in BaseDumper 82 public BaseDumper(byte[] bytes, PrintStream out, in BaseDumper() argument 84 this.bytes = bytes; in BaseDumper() 126 public void parsed(ByteArray bytes, int offset, int len, String human) { in parsed() argument 127 offset = bytes.underlyingOffset(offset, getBytes()); in parsed() 146 public void startParsingMember(ByteArray bytes, int offset, String name, in startParsingMember() argument 152 public void endParsingMember(ByteArray bytes, int offset, String name, in endParsingMember() argument 174 at = arr.underlyingOffset(offset, bytes); in setAt() 183 return bytes; in getBytes() 264 return Hex.dump(bytes, offset, len, offset, hexCols, 4); in hexDump()
|
D | DotDumper.java | 44 private final byte[] bytes; field in DotDumper 50 static void dump(byte[] bytes, String filePath, Args args) { in dump() argument 51 new DotDumper(bytes, filePath, args).run(); in dump() 54 DotDumper(byte[] bytes, String filePath, Args args) { in DotDumper() argument 55 this.bytes = bytes; in DotDumper() 63 ByteArray ba = new ByteArray(bytes); in run() 93 public void parsed(ByteArray bytes, int offset, int len, String human) { in parsed() argument 98 public void startParsingMember(ByteArray bytes, int offset, String name, in startParsingMember() argument 103 public void endParsingMember(ByteArray bytes, int offset, String name, in endParsingMember() argument
|
/dalvik/dx/src/com/android/dx/cf/cst/ |
D | ConstantPoolParser.java | 54 private final ByteArray bytes; field in ConstantPoolParser 77 public ConstantPoolParser(ByteArray bytes) { in ConstantPoolParser() argument 78 int size = bytes.getUnsignedShort(8); // constant_pool_count in ConstantPoolParser() 80 this.bytes = bytes; in ConstantPoolParser() 132 observer.parsed(bytes, 8, 2, in parse() 134 observer.parsed(bytes, 10, 0, "\nconstant_pool:"); in parse() 169 observer.parsed(bytes, offset, nextOffset - offset, human); in parse() 173 observer.parsed(bytes, endOffset, 0, "end constant_pool"); in parse() 186 int tag = bytes.getUnsignedByte(at); in determineOffsets() 212 at += bytes.getUnsignedShort(at + 1) + 3; in determineOffsets() [all …]
|
/dalvik/dx/src/com/android/dx/io/ |
D | DexHasher.java | 47 byte[] bytes = dex.getBytes(); in computeSignature() 48 digest.update(bytes, offset, bytes.length - offset); in computeSignature() 59 byte[] bytes = dex.getBytes(); in computeChecksum() 60 adler32.update(bytes, offset, bytes.length - offset); in computeChecksum()
|
/dalvik/dx/src/com/android/dx/cf/code/ |
D | BytecodeArray.java | 42 private final ByteArray bytes; field in BytecodeArray 57 public BytecodeArray(ByteArray bytes, ConstantPool pool) { in BytecodeArray() argument 58 if (bytes == null) { in BytecodeArray() 66 this.bytes = bytes; in BytecodeArray() 76 return bytes; in getBytes() 85 return bytes.size(); in size() 96 return 4 + bytes.size(); in byteLength() 106 int sz = bytes.size(); in forEach() 126 int sz = bytes.size(); in getInstructionOffsets() 222 int opcode = bytes.getUnsignedByte(offset); in parseInstruction() [all …]
|
/dalvik/dx/src/com/android/dx/cf/iface/ |
D | ParseObserver.java | 43 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/dx/tests/034-dex-minimal/ |
D | expected.txt | 64 | header: 1 item; 112 bytes total 65 | 112 bytes/item 66 | map list: 1 item; 28 bytes total 67 | 28 bytes/item
|
/dalvik/tests/003-omnibus-opcodes/src/ |
D | Array.java | 12 static void checkBytes(byte[] bytes) { in checkBytes() argument 13 assert(bytes[0] == 0); in checkBytes() 14 assert(bytes[1] == -1); in checkBytes() 15 assert(bytes[2] == -2); in checkBytes() 16 assert(bytes[3] == -3); in checkBytes() 17 assert(bytes[4] == -4); in checkBytes()
|
/dalvik/dx/src/com/android/dx/dex/file/ |
D | DexFile.java | 625 private static void calcSignature(byte[] bytes) { in calcSignature() argument 634 md.update(bytes, 32, bytes.length - 32); in calcSignature() 637 int amt = md.digest(bytes, 12, 20); in calcSignature() 653 private static void calcChecksum(byte[] bytes) { in calcChecksum() argument 656 a32.update(bytes, 12, bytes.length - 12); in calcChecksum() 660 bytes[8] = (byte) sum; in calcChecksum() 661 bytes[9] = (byte) (sum >> 8); in calcChecksum() 662 bytes[10] = (byte) (sum >> 16); in calcChecksum() 663 bytes[11] = (byte) (sum >> 24); in calcChecksum()
|
/dalvik/dexgen/src/com/android/dexgen/dex/file/ |
D | DexFile.java | 606 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()
|