/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...] |
/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 | SsaDumper.java | 55 * @param bytes {@code non-null;} bytes of the original class file 61 public static void dump(byte[] bytes, PrintStream out, argument 63 SsaDumper sd = new SsaDumper(bytes, out, filePath, args); 70 * @param bytes {@code non-null;} bytes of the original class file 76 private SsaDumper(byte[] bytes, PrintStream out, String filePath, argument 78 super(bytes, out, filePath, true, args); 83 public void endParsingMember(ByteArray bytes, int offset, String name, argument 183 setAt(bytes, [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...] |
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...] |
/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/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...] |
H A D | ByteArrayAnnotatedOutput.java | 60 * {@code >= 8 (if used);} the number of bytes of hex output to use 109 * may be larger than the number of bytes written 122 * bytes at the end). 263 public void write(ByteArray bytes) { argument 264 int blen = bytes.size(); 275 bytes.getBytes(data, writeAt); 280 public void write(byte[] bytes, int offset, int length) { argument 286 if (((offset | length | end) < 0) || (bytesEnd > bytes.length)) { 287 throw new IndexOutOfBoundsException("bytes.length " + 288 bytes 304 write(byte[] bytes) argument [all...] |
/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/dx/src/com/android/dx/cf/direct/ |
H A D | ClassPathOpener.java | 62 * @param bytes {@code non-null;} file data 67 boolean processFileBytes(String name, long lastModified, byte[] bytes); argument 134 byte[] bytes = FileUtils.readFile(file); 135 return consumer.processFileBytes(path, file.lastModified(), bytes); 244 byte[] bytes = baos.toByteArray(); 245 any |= consumer.processFileBytes(path, one.getTime(), bytes);
|
H A D | AnnotationParser.java | 58 /** {@code non-null;} bytes of the attribute data */ 59 private final ByteArray bytes; field in class:AnnotationParser 78 * @param length {@code >= 0;} number of bytes left in the attribute data 90 this.bytes = cf.getBytes().slice(offset, offset + length); 91 this.input = bytes.makeDataInputStream(); 438 * Helper which will throw an exception if the given number of bytes 441 * @param requiredLength the number of required bytes 450 * Helper which indicates that some bytes were just parsed. This should 454 * @param length {@code >= 0;} number of bytes parsed 458 observer.parsed(bytes, parseCurso [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 | 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 | 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...] |
/dalvik/dx/src/com/android/dx/dex/cf/ |
H A D | CfTranslator.java | 79 * @param bytes {@code non-null;} contents of the file 84 public static ClassDefItem translate(String filePath, byte[] bytes, argument 87 return translate0(filePath, bytes, cfOptions, dexOptions); 101 * @param bytes {@code non-null;} contents of the file 106 private static ClassDefItem translate0(String filePath, byte[] bytes, argument 109 new DirectClassFile(bytes, filePath, cfOptions.strictNameCheck);
|
/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/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/dexgen/src/com/android/dexgen/dex/file/ |
H A D | DexFile.java | 604 * @param bytes {@code non-null;} the bytes of the file 606 private static void calcSignature(byte[] bytes) { argument 615 md.update(bytes, 32, bytes.length - 32); 618 int amt = md.digest(bytes, 12, 20); 621 " bytes"); 632 * @param bytes {@code non-null;} the bytes of the file 634 private static void calcChecksum(byte[] bytes) { argument [all...] |
/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/dx/src/com/android/dx/dex/file/ |
H A D | DexFile.java | 623 * @param bytes {@code non-null;} the bytes of the file 625 private static void calcSignature(byte[] bytes) { argument 634 md.update(bytes, 32, bytes.length - 32); 637 int amt = md.digest(bytes, 12, 20); 640 " bytes"); 651 * @param bytes {@code non-null;} the bytes of the file 653 private static void calcChecksum(byte[] bytes) { argument [all...] |