Lines Matching refs:bytes

83     /** {@code non-null;} the bytes of the file */
84 private final ByteArray bytes;
169 * @param bytes {@code non-null;} the bytes of the file
177 public DirectClassFile(ByteArray bytes, String filePath,
179 if (bytes == null) {
180 throw new NullPointerException("bytes == null");
188 this.bytes = bytes;
196 * @param bytes {@code non-null;} the bytes of the file
204 public DirectClassFile(byte[] bytes, String filePath,
206 this(new ByteArray(bytes), filePath, strictParse);
243 * @return {@code non-null;} the bytes
246 return bytes;
329 * data comes from the bytes of this instance, interpreted as a
335 * @param offset offset into {@link #bytes} for the start of the
337 * @param size number of elements in the list (not number of bytes)
349 return new DcfTypeList(bytes, offset, size, pool, observer);
359 return bytes.getInt(0);
369 return bytes.getUnsignedShort(4);
379 return bytes.getUnsignedShort(6);
453 if (bytes.size() < 10) {
458 observer.parsed(bytes, 0, 0, "begin classfile");
459 observer.parsed(bytes, 0, 4, "magic: " + Hex.u4(getMagic0()));
460 observer.parsed(bytes, 4, 2,
462 observer.parsed(bytes, 6, 2,
480 ConstantPoolParser cpParser = new ConstantPoolParser(bytes);
486 int accessFlags = bytes.getUnsignedShort(at); // u2 access_flags;
487 int cpi = bytes.getUnsignedShort(at + 2); // u2 this_class;
489 cpi = bytes.getUnsignedShort(at + 4); // u2 super_class;
491 int count = bytes.getUnsignedShort(at + 6); // u2 interfaces_count
494 observer.parsed(bytes, at, 2,
497 observer.parsed(bytes, at + 2, 2, "this_class: " + thisClass);
498 observer.parsed(bytes, at + 4, 2, "super_class: " +
500 observer.parsed(bytes, at + 6, 2,
503 observer.parsed(bytes, at + 8, 0, "interfaces:");
553 if (at != bytes.size()) {
554 throw new ParseException("extra bytes at end of class file, " +
559 observer.parsed(bytes, at, 0, "end classfile");
565 * from the bytes of an instance of this (outer) class,
574 private final ByteArray bytes;
576 /** number of elements in the list (not number of bytes) */
585 * @param bytes {@code non-null;} original classfile's bytes
586 * @param offset offset into {@link #bytes} for the start of the
588 * @param size number of elements in the list (not number of bytes)
592 public DcfTypeList(ByteArray bytes, int offset, int size,
598 bytes = bytes.slice(offset, offset + size * 2);
599 this.bytes = bytes;
605 int idx = bytes.getUnsignedShort(offset);
614 observer.parsed(bytes, offset, 2, " " + type);
637 int idx = bytes.getUnsignedShort(n * 2);