Searched refs:bytes (Results 1 - 25 of 38) sorted by relevance

12

/dalvik/dx/src/com/android/dex/util/
H A DByteArrayByteInput.java21 private final byte[] bytes; field in class:ByteArrayByteInput
24 public ByteArrayByteInput(byte... bytes) { argument
25 this.bytes = bytes;
29 return bytes[position++];
/dalvik/dexgen/src/com/android/dexgen/util/
H A DOutput.java27 * 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 DByteArray.java31 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 DParseObserver.java37 * @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/dx/src/com/android/dx/util/
H A DOutput.java29 * bytes written to this instance.
78 * @return {@code 1..5;} the number of bytes actually written
88 * @return {@code 1..5;} the number of bytes actually written
95 * @param bytes {@code non-null;} the array to write
97 public void write(ByteArray bytes); argument
102 * @param bytes {@code non-null;} the array to write
103 * @param offset {@code >= 0;} offset into {@code bytes} for the first
105 * @param length {@code >= 0;} number of bytes to write
107 public void write(byte[] bytes, int offset, int length); argument
111 * a convenient shorthand for {@code write(bytes,
115 write(byte[] bytes) argument
[all...]
H A DByteArray.java31 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/rop/cst/
H A DCstUtf8.java35 /** {@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 DCstString.java36 /** {@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 DClassDumper.java32 * @param bytes {@code non-null;} bytes of the (alleged) class file
39 public static void dump(byte[] bytes, PrintStream out, argument
42 new ClassDumper(bytes, out, filePath, args);
50 private ClassDumper(byte[] bytes, PrintStream out, argument
52 super(bytes, out, filePath, args);
59 byte[] bytes = getBytes();
60 ByteArray ba = new ByteArray(bytes);
69 if (at != bytes.length) {
70 parsed(ba, at, bytes
[all...]
H A DMain.java53 } else if (arg.equals("--bytes")) {
92 byte[] bytes = FileUtils.readFile(name);
96 src = new String(bytes, "utf-8");
100 bytes = HexParser.parse(src);
102 processOne(name, bytes);
118 * @param bytes {@code non-null;} contents of the file
120 private void processOne(String name, byte[] bytes) { argument
122 DotDumper.dump(bytes, name, parsedArgs);
124 BlockDumper.dump(bytes, System.out, name, false, parsedArgs);
126 BlockDumper.dump(bytes, Syste
[all...]
H A DBlockDumper.java74 * @param bytes {@code non-null;} bytes of the (alleged) class file
81 public static void dump(byte[] bytes, PrintStream out, argument
83 BlockDumper bd = new BlockDumper(bytes, out, filePath,
92 BlockDumper(byte[] bytes, PrintStream out, String filePath, argument
94 super(bytes, out, filePath, args);
107 byte[] bytes = getBytes();
108 ByteArray ba = new ByteArray(bytes);
136 public void parsed(ByteArray bytes, int offset, int len, String human) { argument
138 super.parsed(bytes, offse
152 startParsingMember(ByteArray bytes, int offset, String name, String descriptor) argument
180 endParsingMember(ByteArray bytes, int offset, String name, String descriptor, Member member) argument
[all...]
H A DBaseDumper.java37 private final byte[] bytes; field in class:BaseDumper
39 /** whether or not to include the raw bytes (in a column on the left) */
57 /** number of bytes per line in hex dumps */
78 * @param bytes {@code non-null;} bytes of the (alleged) class file
84 public BaseDumper(byte[] bytes, PrintStream out, argument
86 this.bytes = bytes;
130 public void parsed(ByteArray bytes, int offset, int len, String human) { argument
131 offset = bytes
150 startParsingMember(ByteArray bytes, int offset, String name, String descriptor) argument
156 endParsingMember(ByteArray bytes, int offset, String name, String descriptor, Member member) argument
[all...]
H A DDotDumper.java45 private final byte[] bytes; field in class:DotDumper
52 static void dump(byte[] bytes, String filePath, Args args) { argument
53 new DotDumper(bytes, filePath, args).run();
56 DotDumper(byte[] bytes, String filePath, Args args) { argument
57 this.bytes = bytes;
66 ByteArray ba = new ByteArray(bytes);
96 public void parsed(ByteArray bytes, int offset, int len, String human) { argument
101 public void startParsingMember(ByteArray bytes, int offset, String name, argument
106 public void endParsingMember(ByteArray bytes, in argument
[all...]
/dalvik/dx/src/com/android/dx/cf/direct/
H A DDirectClassFile.java85 /** {@code non-null;} the bytes of the file */
86 private final ByteArray bytes; field in class:DirectClassFile
171 * @param bytes {@code non-null;} the bytes of the file
179 public DirectClassFile(ByteArray bytes, String filePath, argument
181 if (bytes == null) {
182 throw new NullPointerException("bytes == null");
190 this.bytes = bytes;
198 * @param bytes {
206 DirectClassFile(byte[] bytes, String filePath, boolean strictParse) argument
597 private final ByteArray bytes; field in class:DirectClassFile.DcfTypeList
615 DcfTypeList(ByteArray bytes, int offset, int size, StdConstantPool pool, ParseObserver observer) argument
[all...]
H A DAttributeFactory.java56 * 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 DMemberListParser.java59 * @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 DStdAttributeFactory.java227 ByteArray bytes = cf.getBytes();
228 int numMethods = bytes.getUnsignedShort(offset);
230 observer.parsed(bytes, offset, 2,
237 BootstrapMethodsList methods = parseBootstrapMethods(bytes, cf.getConstantPool(),
252 ByteArray bytes = cf.getBytes();
254 int maxStack = bytes.getUnsignedShort(offset); // u2 max_stack
255 int maxLocals = bytes.getUnsignedShort(offset + 2); // u2 max_locals
256 int codeLength = bytes.getInt(offset + 4); // u4 code_length
260 observer.parsed(bytes, offset, 2,
262 observer.parsed(bytes, offse
593 parseLocalVariables(ByteArray bytes, ConstantPool pool, ParseObserver observer, int count, boolean typeTable) argument
816 parseBootstrapMethods(ByteArray bytes, ConstantPool constantPool, CstType declaringClass, int numMethods, int offset, int length, ParseObserver observer) argument
[all...]
H A DCodeObserver.java40 private final ByteArray bytes; field in class:CodeObserver
48 * @param bytes {@code non-null;} actual array of bytecode
51 public CodeObserver(ByteArray bytes, ParseObserver observer) { argument
52 if (bytes == null) {
53 throw new NullPointerException("bytes == null");
60 this.bytes = bytes;
66 observer.parsed(bytes, offset, length, header(offset));
71 observer.parsed(bytes, offset, length, header(offset));
91 observer.parsed(bytes, offse
[all...]
H A DClassPathOpener.java63 * @param bytes {@code non-null;} file data
68 boolean processFileBytes(String name, long lastModified, byte[] bytes); argument
169 byte[] bytes = FileUtils.readFile(file);
170 return consumer.processFileBytes(path, file.lastModified(), bytes);
268 final byte[] bytes;
279 bytes = baos.toByteArray();
281 bytes = new byte[0];
284 any |= consumer.processFileBytes(path, one.getTime(), bytes);
H A DAttributeListParser.java57 * @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/cf/attrib/
H A DAttBootstrapMethods.java39 int bytes = ATTRIBUTE_HEADER_BYTES + bootstrapMethods.size() * BOOTSTRAP_METHOD_BYTES;
42 bytes += numberOfArguments * BOOTSTRAP_ARGUMENT_BYTES;
44 this.byteLength = bytes;
/dalvik/dx/src/com/android/dx/cf/cst/
H A DConstantPoolParser.java59 /** {@code non-null;} the bytes of the constant pool */
60 private final ByteArray bytes; field in class:ConstantPoolParser
81 * @param bytes {@code non-null;} the bytes of the file
83 public ConstantPoolParser(ByteArray bytes) { argument
84 int size = bytes.getUnsignedShort(8); // constant_pool_count
86 this.bytes = bytes;
138 observer.parsed(bytes, 8, 2,
140 observer.parsed(bytes, 1
[all...]
/dalvik/dexgen/src/com/android/dexgen/dex/file/
H A DStringDataItem.java47 * @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 DStringDataItem.java47 * @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/cf/code/
H A DBytecodeArray.java43 /** {@code non-null;} underlying bytes */
44 private final ByteArray bytes; field in class:BytecodeArray
55 * @param bytes {@code non-null;} underlying bytes
59 public BytecodeArray(ByteArray bytes, ConstantPool pool) { argument
60 if (bytes == null) {
61 throw new NullPointerException("bytes == null");
68 this.bytes = bytes;
78 return bytes;
[all...]

Completed in 2288 milliseconds

12