/** * Create a Buffer using the byte range as the initial value. * * @param bytes Copy of this array becomes the backing storage for the object. * @param offset offset into byte array * @param length length of data */ public Buffer(byte[] bytes, int offset, int length) { copy(bytes, offset, length); }
/** * Create a Buffer using the byte range as the initial value. * * @param bytes Copy of this array becomes the backing storage for the object. * @param offset offset into byte array * @param length length of data */ public Buffer(byte[] bytes, int offset, int length) { copy(bytes, offset, length); }
/** * Create a Buffer using the byte range as the initial value. * * @param bytes Copy of this array becomes the backing storage for the object. * @param offset offset into byte array * @param length length of data */ public Buffer(byte[] bytes, int offset, int length) { copy(bytes, offset, length); }
/** * Create a Buffer using the byte range as the initial value. * * @param bytes Copy of this array becomes the backing storage for the object. * @param offset offset into byte array * @param length length of data */ public Buffer(byte[] bytes, int offset, int length) { copy(bytes, offset, length); }
/** * Create a Buffer using the byte range as the initial value. * * @param bytes Copy of this array becomes the backing storage for the object. * @param offset offset into byte array * @param length length of data */ public Buffer(byte[] bytes, int offset, int length) { copy(bytes, offset, length); }
/** * Create a Buffer using the byte range as the initial value. * * @param bytes Copy of this array becomes the backing storage for the object. * @param offset offset into byte array * @param length length of data */ public Buffer(byte[] bytes, int offset, int length) { copy(bytes, offset, length); }
/** * Create a Buffer using the byte range as the initial value. * * @param bytes Copy of this array becomes the backing storage for the object. * @param offset offset into byte array * @param length length of data */ public Buffer(byte[] bytes, int offset, int length) { copy(bytes, offset, length); }
public Object clone() throws CloneNotSupportedException { Buffer result = (Buffer) super.clone(); result.copy(this.get(), 0, this.getCount()); return result; } }
@Override public Object clone() throws CloneNotSupportedException { Buffer result = (Buffer) super.clone(); result.copy(this.get(), 0, this.getCount()); return result; } }
@Override public Object clone() throws CloneNotSupportedException { Buffer result = (Buffer) super.clone(); result.copy(this.get(), 0, this.getCount()); return result; } }
@Override public Object clone() throws CloneNotSupportedException { Buffer result = (Buffer) super.clone(); result.copy(this.get(), 0, this.getCount()); return result; } }
@Override public Object clone() throws CloneNotSupportedException { Buffer result = (Buffer) super.clone(); result.copy(this.get(), 0, this.getCount()); return result; } }
@Override public Object clone() throws CloneNotSupportedException { Buffer result = (Buffer) super.clone(); result.copy(this.get(), 0, this.getCount()); return result; } }
public Object clone() throws CloneNotSupportedException { Buffer result = (Buffer) super.clone(); result.copy(this.get(), 0, this.getCount()); return result; } }
/** * Test of copy method, of class org.apache.hadoop.record.Buffer. */ public void testCopy() { final byte[] bytes = new byte[10]; final int offset = 6; final int length = 3; for (int idx = 0; idx < 10; idx ++) { bytes[idx] = (byte) idx; } final Buffer instance = new Buffer(); instance.copy(bytes, offset, length); assertEquals("copy failed", 3, instance.getCapacity()); assertEquals("copy failed", 3, instance.get().length); for (int idx = 0; idx < 3; idx++) { assertEquals("Buffer content corrupted", idx+6, instance.get()[idx]); } }