/dalvik/dx/src/com/android/dx/util/ |
H A D | ByteArrayByteInput.java | 21 private final byte[] bytes; field in class:ByteArrayByteInput 24 public ByteArrayByteInput(byte... bytes) { argument 25 this.bytes = bytes; 29 return bytes[position++];
|
H A D | Output.java | 27 * bytes written to this instance. 76 * @return {@code 1..5;} the number of bytes actually written 86 * @return {@code 1..5;} the number of bytes actually written 93 * @param bytes {@code non-null;} the array to write 95 public void write(ByteArray bytes); argument 100 * @param bytes {@code non-null;} the array to write 101 * @param offset {@code >= 0;} offset into {@code bytes} for the first 103 * @param length {@code >= 0;} number of bytes to write 105 public void write(byte[] bytes, int offset, int length); argument 109 * a convenient shorthand for {@code write(bytes, 113 write(byte[] bytes) argument [all...] |
H A D | ByteArray.java | 31 private final byte[] bytes; field in class:ByteArray 36 /** {@code >= 0, <= bytes.length}; size computed as 43 * @param bytes {@code non-null;} the underlying array 45 * @param end {@code >= start, <= bytes.length;} end index of 48 public ByteArray(byte[] bytes, int start, int end) { argument 49 if (bytes == null) { 50 throw new NullPointerException("bytes == null"); 61 if (end > bytes.length) { 62 throw new IllegalArgumentException("end > bytes.length"); 65 this.bytes 75 ByteArray(byte[] bytes) argument 111 underlyingOffset(int offset, byte[] bytes) argument [all...] |
/dalvik/dexgen/src/com/android/dexgen/util/ |
H A D | Output.java | 27 * bytes written to this instance. 76 * @return {@code 1..5;} the number of bytes actually written 86 * @return {@code 1..5;} the number of bytes actually written 93 * @param bytes {@code non-null;} the array to write 95 public void write(ByteArray bytes); argument 100 * @param bytes {@code non-null;} the array to write 101 * @param offset {@code >= 0;} offset into {@code bytes} for the first 103 * @param length {@code >= 0;} number of bytes to write 105 public void write(byte[] bytes, int offset, int length); argument 109 * a convenient shorthand for {@code write(bytes, 113 write(byte[] bytes) argument [all...] |
H A D | ByteArray.java | 31 private final byte[] bytes; field in class:ByteArray 36 /** {@code >= 0, <= bytes.length}; size computed as 43 * @param bytes {@code non-null;} the underlying array 45 * @param end {@code >= start, <= bytes.length;} end index of 48 public ByteArray(byte[] bytes, int start, int end) { argument 49 if (bytes == null) { 50 throw new NullPointerException("bytes == null"); 61 if (end > bytes.length) { 62 throw new IllegalArgumentException("end > bytes.length"); 65 this.bytes 75 ByteArray(byte[] bytes) argument 111 underlyingOffset(int offset, byte[] bytes) argument [all...] |
/dalvik/dx/src/com/android/dx/cf/iface/ |
H A D | ParseObserver.java | 37 * @param bytes {@code non-null;} the source that is being parsed 38 * @param offset offset into {@code bytes} for the start of the 43 public void startParsingMember(ByteArray bytes, int offset, String name, argument 49 * @param bytes {@code non-null;} the source that was parsed 50 * @param offset offset into {@code bytes} for the end of the 56 public void endParsingMember(ByteArray bytes, int offset, String name, argument 62 * @param bytes {@code non-null;} the source that was parsed 63 * @param offset offset into {@code bytes} for what was parsed 64 * @param len number of bytes parsed 67 public void parsed(ByteArray bytes, in argument [all...] |
/dalvik/dexgen/src/com/android/dexgen/rop/cst/ |
H A D | CstUtf8.java | 35 /** {@code non-null;} the UTF-8 value as bytes */ 36 private final ByteArray bytes; field in class:CstUtf8 44 * @return {@code non-null;} the UTF-8 bytes for it 48 byte[] bytes = new byte[len * 3]; // Avoid having to reallocate. 54 bytes[outAt] = (byte) c; 57 bytes[outAt] = (byte) (((c >> 6) & 0x1f) | 0xc0); 58 bytes[outAt + 1] = (byte) ((c & 0x3f) | 0x80); 61 bytes[outAt] = (byte) (((c >> 12) & 0x0f) | 0xe0); 62 bytes[outAt + 1] = (byte) (((c >> 6) & 0x3f) | 0x80); 63 bytes[outA 79 utf8BytesToString(ByteArray bytes) argument 194 CstUtf8(ByteArray bytes) argument [all...] |
/dalvik/dx/src/com/android/dx/rop/cst/ |
H A D | CstString.java | 36 /** {@code non-null;} the UTF-8 value as bytes */ 37 private final ByteArray bytes; field in class:CstString 44 * @return {@code non-null;} the UTF-8 bytes for it 48 byte[] bytes = new byte[len * 3]; // Avoid having to reallocate. 54 bytes[outAt] = (byte) c; 57 bytes[outAt] = (byte) (((c >> 6) & 0x1f) | 0xc0); 58 bytes[outAt + 1] = (byte) ((c & 0x3f) | 0x80); 61 bytes[outAt] = (byte) (((c >> 12) & 0x0f) | 0xe0); 62 bytes[outAt + 1] = (byte) (((c >> 6) & 0x3f) | 0x80); 63 bytes[outA 79 utf8BytesToString(ByteArray bytes) argument 194 CstString(ByteArray bytes) argument [all...] |
/dalvik/dx/src/com/android/dx/command/dump/ |
H A D | ClassDumper.java | 33 * @param bytes {@code non-null;} bytes of the (alleged) class file 40 public static void dump(byte[] bytes, PrintStream out, argument 43 new ClassDumper(bytes, out, filePath, args); 51 private ClassDumper(byte[] bytes, PrintStream out, argument 53 super(bytes, out, filePath, args); 60 byte[] bytes = getBytes(); 61 ByteArray ba = new ByteArray(bytes); 70 if (at != bytes.length) { 71 parsed(ba, at, bytes [all...] |
H A D | Main.java | 49 } else if (arg.equals("--bytes")) { 88 byte[] bytes = FileUtils.readFile(name); 92 src = new String(bytes, "utf-8"); 96 bytes = HexParser.parse(src); 98 processOne(name, bytes); 114 * @param bytes {@code non-null;} contents of the file 116 private static void processOne(String name, byte[] bytes) { argument 118 DotDumper.dump(bytes, name, parsedArgs); 120 BlockDumper.dump(bytes, System.out, name, false, parsedArgs); 122 BlockDumper.dump(bytes, Syste [all...] |
H A D | BlockDumper.java | 75 * @param bytes {@code non-null;} bytes of the (alleged) class file 82 public static void dump(byte[] bytes, PrintStream out, argument 84 BlockDumper bd = new BlockDumper(bytes, out, filePath, 93 BlockDumper(byte[] bytes, PrintStream out, String filePath, argument 95 super(bytes, out, filePath, args); 108 byte[] bytes = getBytes(); 109 ByteArray ba = new ByteArray(bytes); 137 public void parsed(ByteArray bytes, int offset, int len, String human) { argument 139 super.parsed(bytes, offse 153 startParsingMember(ByteArray bytes, int offset, String name, String descriptor) argument 181 endParsingMember(ByteArray bytes, int offset, String name, String descriptor, Member member) argument [all...] |
H A D | BaseDumper.java | 38 private final byte[] bytes; field in class:BaseDumper 40 /** whether or not to include the raw bytes (in a column on the left) */ 58 /** number of bytes per line in hex dumps */ 76 * @param bytes {@code non-null;} bytes of the (alleged) class file 82 public BaseDumper(byte[] bytes, PrintStream out, argument 84 this.bytes = bytes; 126 public void parsed(ByteArray bytes, int offset, int len, String human) { argument 127 offset = bytes 146 startParsingMember(ByteArray bytes, int offset, String name, String descriptor) argument 152 endParsingMember(ByteArray bytes, int offset, String name, String descriptor, Member member) argument [all...] |
H A D | DotDumper.java | 44 private final byte[] bytes; field in class:DotDumper 50 static void dump(byte[] bytes, String filePath, Args args) { argument 51 new DotDumper(bytes, filePath, args).run(); 54 DotDumper(byte[] bytes, String filePath, Args args) { argument 55 this.bytes = bytes; 63 ByteArray ba = new ByteArray(bytes); 93 public void parsed(ByteArray bytes, int offset, int len, String human) { argument 98 public void startParsingMember(ByteArray bytes, int offset, String name, argument 103 public void endParsingMember(ByteArray bytes, in argument [all...] |
/dalvik/dx/src/com/android/dx/cf/direct/ |
H A D | DirectClassFile.java | 82 /** {@code non-null;} the bytes of the file */ 83 private final ByteArray bytes; field in class:DirectClassFile 168 * @param bytes {@code non-null;} the bytes of the file 176 public DirectClassFile(ByteArray bytes, String filePath, argument 178 if (bytes == null) { 179 throw new NullPointerException("bytes == null"); 187 this.bytes = bytes; 195 * @param bytes { 203 DirectClassFile(byte[] bytes, String filePath, boolean strictParse) argument 564 private final ByteArray bytes; field in class:DirectClassFile.DcfTypeList 582 DcfTypeList(ByteArray bytes, int offset, int size, StdConstantPool pool, ParseObserver observer) argument [all...] |
H A D | AttributeFactory.java | 56 * Parses and makes an attribute based on the bytes at the 64 * @param offset offset into {@code dcf}'s {@code bytes} 82 ByteArray bytes = cf.getBytes(); 84 int nameIdx = bytes.getUnsignedShort(offset); 85 int length = bytes.getInt(offset + 2); 90 observer.parsed(bytes, offset, 2, 92 observer.parsed(bytes, offset + 2, 4, 115 * @param offset offset into {@code bytes} to start parsing at; this 124 ByteArray bytes = cf.getBytes(); 126 Attribute result = new RawAttribute(name, bytes, offse [all...] |
H A D | MemberListParser.java | 59 * @param offset offset in {@code bytes} to the start of the list 118 ByteArray bytes = cf.getBytes(); 119 return bytes.getUnsignedShort(offset); 177 ByteArray bytes = cf.getBytes(); 181 observer.parsed(bytes, offset, 2, 187 int accessFlags = bytes.getUnsignedShort(at); 188 int nameIdx = bytes.getUnsignedShort(at + 2); 189 int descIdx = bytes.getUnsignedShort(at + 4); 194 observer.startParsingMember(bytes, at, name.getString(), 196 observer.parsed(bytes, a [all...] |
H A D | StdAttributeFactory.java | 217 ByteArray bytes = cf.getBytes(); 219 int maxStack = bytes.getUnsignedShort(offset); // u2 max_stack 220 int maxLocals = bytes.getUnsignedShort(offset + 2); // u2 max_locals 221 int codeLength = bytes.getInt(offset + 4); // u4 code_length 225 observer.parsed(bytes, offset, 2, 227 observer.parsed(bytes, offset + 2, 2, 229 observer.parsed(bytes, offset + 4, 4, 244 new BytecodeArray(bytes.slice(codeOffset, codeOffset + codeLength), 251 int exceptionTableLength = bytes.getUnsignedShort(offset); 257 observer.parsed(bytes, offse 558 parseLocalVariables(ByteArray bytes, ConstantPool pool, ParseObserver observer, int count, boolean typeTable) argument [all...] |
H A D | CodeObserver.java | 43 private final ByteArray bytes; field in class:CodeObserver 51 * @param bytes {@code non-null;} actual array of bytecode 54 public CodeObserver(ByteArray bytes, ParseObserver observer) { argument 55 if (bytes == null) { 56 throw new NullPointerException("bytes == null"); 63 this.bytes = bytes; 69 observer.parsed(bytes, offset, length, header(offset)); 74 observer.parsed(bytes, offset, length, header(offset)); 94 observer.parsed(bytes, offse [all...] |
H A D | AttributeListParser.java | 57 * @param offset offset in {@code bytes} to the start of the list 126 ByteArray bytes = cf.getBytes(); 129 observer.parsed(bytes, offset, 2, 136 observer.parsed(bytes, at, 0, 149 observer.parsed(bytes, at, 0,
|
/dalvik/dx/src/com/android/dx/io/ |
H A D | DexHasher.java | 34 * Returns the signature of all but the first 32 bytes of {@code dex}. The 35 * first 32 bytes of dex files are not specified to be included in the 47 byte[] bytes = dex.getBytes(); 48 digest.update(bytes, offset, bytes.length - offset); 53 * Returns the checksum of all but the first 12 bytes of {@code dex}. 59 byte[] bytes = dex.getBytes(); 60 adler32.update(bytes, offset, bytes.length - offset);
|
/dalvik/dx/src/com/android/dx/cf/cst/ |
H A D | ConstantPoolParser.java | 53 /** {@code non-null;} the bytes of the constant pool */ 54 private final ByteArray bytes; field in class:ConstantPoolParser 75 * @param bytes {@code non-null;} the bytes of the file 77 public ConstantPoolParser(ByteArray bytes) { argument 78 int size = bytes.getUnsignedShort(8); // constant_pool_count 80 this.bytes = bytes; 132 observer.parsed(bytes, 8, 2, 134 observer.parsed(bytes, 1 [all...] |
/dalvik/tests/003-omnibus-opcodes/src/ |
H A D | Array.java | 12 static void checkBytes(byte[] bytes) { argument 13 assert(bytes[0] == 0); 14 assert(bytes[1] == -1); 15 assert(bytes[2] == -2); 16 assert(bytes[3] == -3); 17 assert(bytes[4] == -4);
|
/dalvik/dx/src/com/android/dx/cf/code/ |
H A D | BytecodeArray.java | 41 /** {@code non-null;} underlying bytes */ 42 private final ByteArray bytes; field in class:BytecodeArray 53 * @param bytes {@code non-null;} underlying bytes 57 public BytecodeArray(ByteArray bytes, ConstantPool pool) { argument 58 if (bytes == null) { 59 throw new NullPointerException("bytes == null"); 66 this.bytes = bytes; 76 return bytes; [all...] |
/dalvik/dexgen/src/com/android/dexgen/dex/file/ |
H A D | StringDataItem.java | 47 * @return {@code >= 2}; the write size, in bytes 72 ByteArray bytes = value.getBytes(); 78 out.annotate(bytes.size() + 1, value.toQuoted()); 82 out.write(bytes);
|
/dalvik/dx/src/com/android/dx/dex/file/ |
H A D | StringDataItem.java | 47 * @return {@code >= 2}; the write size, in bytes 72 ByteArray bytes = value.getBytes(); 78 out.annotate(bytes.size() + 1, value.toQuoted()); 82 out.write(bytes);
|