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

123

/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.java48 } else if (arg.equals("--bytes")) {
87 byte[] bytes = FileUtils.readFile(name);
91 src = new String(bytes, "utf-8");
95 bytes = HexParser.parse(src);
97 processOne(name, bytes);
113 * @param bytes {@code non-null;} contents of the file
115 private static void processOne(String name, byte[] bytes) { argument
117 DotDumper.dump(bytes, name, parsedArgs);
119 BlockDumper.dump(bytes, System.out, name, false, parsedArgs);
121 BlockDumper.dump(bytes, Syste
[all...]
H A DBlockDumper.java73 * @param bytes {@code non-null;} bytes of the (alleged) class file
80 public static void dump(byte[] bytes, PrintStream out, argument
82 BlockDumper bd = new BlockDumper(bytes, out, filePath,
91 BlockDumper(byte[] bytes, PrintStream out, String filePath, argument
93 super(bytes, out, filePath, args);
106 byte[] bytes = getBytes();
107 ByteArray ba = new ByteArray(bytes);
135 public void parsed(ByteArray bytes, int offset, int len, String human) { argument
137 super.parsed(bytes, offse
151 startParsingMember(ByteArray bytes, int offset, String name, String descriptor) argument
179 endParsingMember(ByteArray bytes, int offset, String name, String descriptor, Member member) argument
[all...]
H A DBaseDumper.java36 private final byte[] bytes; field in class:BaseDumper
38 /** whether or not to include the raw bytes (in a column on the left) */
56 /** number of bytes per line in hex dumps */
74 * @param bytes {@code non-null;} bytes of the (alleged) class file
80 public BaseDumper(byte[] bytes, PrintStream out, argument
82 this.bytes = bytes;
124 public void parsed(ByteArray bytes, int offset, int len, String human) { argument
125 offset = bytes
144 startParsingMember(ByteArray bytes, int offset, String name, String descriptor) argument
150 endParsingMember(ByteArray bytes, int offset, String name, String descriptor, Member member) argument
[all...]
H A DDotDumper.java44 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/tests/098-native-allocations/src/
H A DMain.java28 private int bytes; field in class:Main.NativeAllocation
30 NativeAllocation(int bytes) throws Exception { argument
31 this.bytes = bytes;
32 register_native_allocation.invoke(runtime, bytes);
34 nativeBytes += bytes;
43 nativeBytes -= bytes;
45 register_native_free.invoke(runtime, bytes);
/dalvik/dx/src/com/android/dx/cf/direct/
H A DDirectClassFile.java83 /** {@code non-null;} the bytes of the file */
84 private final ByteArray bytes; field in class:DirectClassFile
169 * @param bytes {@code non-null;} the bytes of the file
177 public DirectClassFile(ByteArray bytes, String filePath, argument
179 if (bytes == null) {
180 throw new NullPointerException("bytes == null");
188 this.bytes = bytes;
196 * @param bytes {
204 DirectClassFile(byte[] bytes, String filePath, boolean strictParse) argument
574 private final ByteArray bytes; field in class:DirectClassFile.DcfTypeList
592 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.java216 ByteArray bytes = cf.getBytes();
218 int maxStack = bytes.getUnsignedShort(offset); // u2 max_stack
219 int maxLocals = bytes.getUnsignedShort(offset + 2); // u2 max_locals
220 int codeLength = bytes.getInt(offset + 4); // u4 code_length
224 observer.parsed(bytes, offset, 2,
226 observer.parsed(bytes, offset + 2, 2,
228 observer.parsed(bytes, offset + 4, 4,
243 new BytecodeArray(bytes.slice(codeOffset, codeOffset + codeLength),
250 int exceptionTableLength = bytes.getUnsignedShort(offset);
256 observer.parsed(bytes, offse
557 parseLocalVariables(ByteArray bytes, ConstantPool pool, ParseObserver observer, int count, boolean typeTable) 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 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/cst/
H A DConstantPoolParser.java56 /** {@code non-null;} the bytes of the constant pool */
57 private final ByteArray bytes; field in class:ConstantPoolParser
78 * @param bytes {@code non-null;} the bytes of the file
80 public ConstantPoolParser(ByteArray bytes) { argument
81 int size = bytes.getUnsignedShort(8); // constant_pool_count
83 this.bytes = bytes;
135 observer.parsed(bytes, 8, 2,
137 observer.parsed(bytes, 1
[all...]
/dalvik/tests/003-omnibus-opcodes/src/
H A DArray.java12 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/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);
H A DDexFile.java604 * @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/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.java42 /** {@code non-null;} underlying bytes */
43 private final ByteArray bytes; field in class:BytecodeArray
54 * @param bytes {@code non-null;} underlying bytes
58 public BytecodeArray(ByteArray bytes, ConstantPool pool) { argument
59 if (bytes == null) {
60 throw new NullPointerException("bytes == null");
67 this.bytes = bytes;
77 return bytes;
[all...]

Completed in 357 milliseconds

123