Lines Matching refs:bytes
31 private final byte[] bytes;
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) {
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 = bytes;
73 * @param bytes {@code non-null;} the underlying array
75 public ByteArray(byte[] bytes) {
76 this(bytes, 0, bytes.length);
80 * Gets the size of the array, in bytes.
98 return new ByteArray(bytes, start + this.start, end + this.start);
106 * @param bytes {@code non-null;} (alleged) underlying array
107 * @return corresponding offset into {@code bytes}
108 * @throws IllegalArgumentException thrown if {@code bytes} is
111 public int underlyingOffset(int offset, byte[] bytes) {
112 if (bytes != this.bytes) {
113 throw new IllegalArgumentException("wrong bytes");
212 System.arraycopy(bytes, start, out, offset, size);
236 return bytes[start + off];
247 return bytes[start + off] & 0xff;
324 System.arraycopy(bytes, cursor + start, arr, offset, length);