/dalvik/dx/src/com/android/dx/cf/direct/ |
D | DirectClassFile.java | 84 private final ByteArray bytes; field in DirectClassFile 177 public DirectClassFile(ByteArray bytes, String filePath, in DirectClassFile() argument 179 if (bytes == null) { in DirectClassFile() 188 this.bytes = bytes; in DirectClassFile() 204 public DirectClassFile(byte[] bytes, String filePath, in DirectClassFile() argument 206 this(new ByteArray(bytes), filePath, strictParse); in DirectClassFile() 246 return bytes; in getBytes() 349 return new DcfTypeList(bytes, offset, size, pool, observer); in makeTypeList() 359 return bytes.getInt(0); in getMagic0() 369 return bytes.getUnsignedShort(4); in getMinorVersion0() [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 | StdAttributeFactory.java | 216 ByteArray bytes = cf.getBytes(); in code() local 218 int maxStack = bytes.getUnsignedShort(offset); // u2 max_stack in code() 219 int maxLocals = bytes.getUnsignedShort(offset + 2); // u2 max_locals in code() 220 int codeLength = bytes.getInt(offset + 4); // u4 code_length in code() 224 observer.parsed(bytes, offset, 2, in code() 226 observer.parsed(bytes, offset + 2, 2, in code() 228 observer.parsed(bytes, offset + 4, 4, in code() 243 new BytecodeArray(bytes.slice(codeOffset, codeOffset + codeLength), in code() 250 int exceptionTableLength = bytes.getUnsignedShort(offset); in code() 256 observer.parsed(bytes, offset, 2, in code() [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 | 40 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() 66 observer.parsed(bytes, offset, length, header(offset)); in visitInvalid() 71 observer.parsed(bytes, offset, length, header(offset)); in visitNoArgs() 91 observer.parsed(bytes, offset, length, in visitLocal() 138 observer.parsed(bytes, offset, length, in visitConstant() 146 observer.parsed(bytes, offset, length, in visitBranch() 173 observer.parsed(bytes, offset, length, sb.toString()); in visitSwitch() [all …]
|
D | ClassPathOpener.java | 68 boolean processFileBytes(String name, long lastModified, byte[] bytes); in processFileBytes() argument 169 byte[] bytes = FileUtils.readFile(file); in processOne() 170 return consumer.processFileBytes(path, file.lastModified(), bytes); in processOne() 268 final byte[] bytes; in processArchive() 279 bytes = baos.toByteArray(); in processArchive() 281 bytes = new byte[0]; in processArchive() 284 any |= consumer.processFileBytes(path, one.getTime(), bytes); in processArchive()
|
D | AttributeListParser.java | 126 ByteArray bytes = cf.getBytes(); in parse() local 129 observer.parsed(bytes, offset, 2, in parse() 136 observer.parsed(bytes, at, 0, in parse() 149 observer.parsed(bytes, at, 0, in parse()
|
/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/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/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/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 | 97 public void write(ByteArray bytes); in write() argument 107 public void write(byte[] bytes, int offset, int length); in write() argument 115 public void write(byte[] bytes); in write() argument
|
/dalvik/dx/src/com/android/dx/command/dump/ |
D | ClassDumper.java | 39 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 (at != bytes.length) { in dump() 70 parsed(ba, at, bytes.length - at, "<extra data at end of file>"); in dump()
|
D | BlockDumper.java | 80 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 163 setAt(bytes, offset); in startParsingMember() [all …]
|
D | Main.java | 87 byte[] bytes = FileUtils.readFile(name); in main() 91 src = new String(bytes, "utf-8"); in main() 95 bytes = HexParser.parse(src); in main() 97 processOne(name, bytes); in main() 115 private static void processOne(String name, byte[] bytes) { in processOne() argument 117 DotDumper.dump(bytes, name, parsedArgs); in processOne() 119 BlockDumper.dump(bytes, System.out, name, false, parsedArgs); in processOne() 121 BlockDumper.dump(bytes, System.out, name, true, parsedArgs); in processOne() 125 SsaDumper.dump(bytes, System.out, name, parsedArgs); in processOne() 127 ClassDumper.dump(bytes, System.out, name, parsedArgs); in processOne()
|
D | BaseDumper.java | 36 private final byte[] bytes; field in BaseDumper 80 public BaseDumper(byte[] bytes, PrintStream out, in BaseDumper() argument 82 this.bytes = bytes; in BaseDumper() 124 public void parsed(ByteArray bytes, int offset, int len, String human) { in parsed() argument 125 offset = bytes.underlyingOffset(offset, getBytes()); in parsed() 144 public void startParsingMember(ByteArray bytes, int offset, String name, in startParsingMember() argument 150 public void endParsingMember(ByteArray bytes, int offset, String name, in endParsingMember() argument 172 at = arr.underlyingOffset(offset, bytes); in setAt() 181 return bytes; in getBytes() 262 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
|
D | SsaDumper.java | 53 public static void dump(byte[] bytes, PrintStream out, in dump() argument 55 SsaDumper sd = new SsaDumper(bytes, out, filePath, args); in dump() 68 private SsaDumper(byte[] bytes, PrintStream out, String filePath, in SsaDumper() argument 70 super(bytes, out, filePath, true, args); in SsaDumper() 75 public void endParsingMember(ByteArray bytes, int offset, String name, in endParsingMember() argument 175 setAt(bytes, 0); in endParsingMember() 176 parsed(bytes, 0, bytes.size(), sb.toString()); in endParsingMember()
|
/dalvik/dx/src/com/android/dx/cf/cst/ |
D | ConstantPoolParser.java | 57 private final ByteArray bytes; field in ConstantPoolParser 80 public ConstantPoolParser(ByteArray bytes) { in ConstantPoolParser() argument 81 int size = bytes.getUnsignedShort(8); // constant_pool_count in ConstantPoolParser() 83 this.bytes = bytes; in ConstantPoolParser() 135 observer.parsed(bytes, 8, 2, in parse() 137 observer.parsed(bytes, 10, 0, "\nconstant_pool:"); in parse() 172 observer.parsed(bytes, offset, nextOffset - offset, human); in parse() 176 observer.parsed(bytes, endOffset, 0, "end constant_pool"); in parse() 189 int tag = bytes.getUnsignedByte(at); in determineOffsets() 216 at += bytes.getUnsignedShort(at + 1) + 3; in determineOffsets() [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/dx/src/com/android/dx/cf/code/ |
D | BytecodeArray.java | 43 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/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()
|
/dalvik/dx/src/com/android/dx/dex/file/ |
D | DexFile.java | 623 private static void calcSignature(byte[] bytes) { in calcSignature() argument 632 md.update(bytes, 32, bytes.length - 32); in calcSignature() 635 int amt = md.digest(bytes, 12, 20); in calcSignature() 651 private static void calcChecksum(byte[] bytes) { in calcChecksum() argument 654 a32.update(bytes, 12, bytes.length - 12); in calcChecksum() 658 bytes[8] = (byte) sum; in calcChecksum() 659 bytes[9] = (byte) (sum >> 8); in calcChecksum() 660 bytes[10] = (byte) (sum >> 16); in calcChecksum() 661 bytes[11] = (byte) (sum >> 24); in calcChecksum()
|