Home | History | Annotate | Download | only in micro

Lines Matching defs:bytes

36  * Immutable array of bytes.
42 private final byte[] bytes;
44 private ByteStringMicro(final byte[] bytes) {
45 this.bytes = bytes;
54 return bytes[index];
58 * Gets the number of bytes.
61 return bytes.length;
68 return bytes.length == 0;
80 * Copies the given bytes into a {@code ByteStringMicro}.
82 public static ByteStringMicro copyFrom(final byte[] bytes, final int offset,
85 System.arraycopy(bytes, offset, copy, 0, size);
90 * Copies the given bytes into a {@code ByteStringMicro}.
92 public static ByteStringMicro copyFrom(final byte[] bytes) {
93 return copyFrom(bytes, 0, bytes.length);
97 * Encodes {@code text} into a sequence of bytes using the named charset
106 * Encodes {@code text} into a sequence of UTF-8 bytes and returns the
121 * Copies bytes into a buffer at the given offset.
127 System.arraycopy(bytes, 0, target, offset, bytes.length);
131 * Copies bytes into a buffer.
134 * @param sourceOffset offset within these bytes
136 * @param size number of bytes to copy
141 System.arraycopy(bytes, sourceOffset, target, targetOffset, size);
145 * Copies bytes to a {@code byte[]}.
148 final int size = bytes.length;
150 System.arraycopy(bytes, 0, copy, 0, size);
155 * Constructs a new {@code String} by decoding the bytes using the
160 return new String(bytes, charsetName);
164 * Constructs a new {@code String} by decoding the bytes as UTF-8.
168 return new String(bytes, "UTF-8");
188 final int size = bytes.length;
189 if (size != other.bytes.length) {
193 final byte[] thisBytes = bytes;
194 final byte[] otherBytes = other.bytes;
211 final byte[] thisBytes = bytes;
212 final int size = bytes.length;