/** Returns a new direct byte buffer with the specified capacity. * * @param capacity The capacity of the new buffer * @return A new direct byte buffer with the specified capacity. */ public static ByteBuffer newDirectByteBuffer (int capacity) { return new DirectReadWriteByteBuffer(capacity); }
/** Returns a new direct byte buffer with the specified capacity. * * @param capacity The capacity of the new buffer * @return A new direct byte buffer with the specified capacity. */ public static ByteBuffer newDirectByteBuffer (int capacity) { return new DirectReadWriteByteBuffer(capacity); }
public ByteBuffer slice () { DirectReadWriteByteBuffer slice = new DirectReadWriteByteBuffer(byteArray.buffer(), remaining(), byteArray.byteOffset() + position); slice.order = order; return slice; } }
public ByteBuffer slice () { DirectReadWriteByteBuffer slice = new DirectReadWriteByteBuffer(byteArray.buffer(), remaining(), byteArray.byteOffset() + position); slice.order = order; return slice; } }
static DirectReadWriteByteBuffer copy (DirectByteBuffer other, int markOfOther) { DirectReadWriteByteBuffer buf = new DirectReadWriteByteBuffer(other.byteArray.buffer(), other.capacity(), other.byteArray.byteOffset()); buf.limit = other.limit(); buf.position = other.position(); buf.mark = markOfOther; buf.order(other.order()); return buf; }
static DirectReadWriteByteBuffer copy (DirectByteBuffer other, int markOfOther) { DirectReadWriteByteBuffer buf = new DirectReadWriteByteBuffer(other.byteArray.buffer(), other.capacity(), other.byteArray.byteOffset()); buf.limit = other.limit(); buf.position = other.position(); buf.mark = markOfOther; buf.order(other.order()); return buf; }
/** Returns a new direct byte buffer with the specified capacity. * * @param capacity The capacity of the new buffer * @return A new direct byte buffer with the specified capacity. */ public static ByteBuffer newDirectByteBuffer (int capacity) { return new DirectReadWriteByteBuffer(capacity); }
/** Returns a new direct byte buffer with the specified capacity. * * @param capacity The capacity of the new buffer * @return A new direct byte buffer with the specified capacity. */ public static ByteBuffer newDirectByteBuffer (int capacity) { return new DirectReadWriteByteBuffer(capacity); }
public ByteBuffer slice () { DirectReadWriteByteBuffer slice = new DirectReadWriteByteBuffer(byteArray.buffer(), remaining(), byteArray.byteOffset() + position); slice.order = order; return slice; } }
public ByteBuffer slice () { DirectReadWriteByteBuffer slice = new DirectReadWriteByteBuffer(byteArray.getBuffer(), remaining(), byteArray.getByteOffset() + position); slice.order = order; return slice; } }
static DirectReadWriteByteBuffer copy (DirectByteBuffer other, int markOfOther) { DirectReadWriteByteBuffer buf = new DirectReadWriteByteBuffer(other.byteArray.getBuffer(), other.capacity(), other.byteArray.getByteOffset()); buf.limit = other.limit(); buf.position = other.position(); buf.mark = markOfOther; buf.order(other.order()); return buf; }
static DirectReadWriteByteBuffer copy (DirectByteBuffer other, int markOfOther) { DirectReadWriteByteBuffer buf = new DirectReadWriteByteBuffer(other.byteArray.buffer(), other.capacity(), other.byteArray.byteOffset()); buf.limit = other.limit(); buf.position = other.position(); buf.mark = markOfOther; buf.order(other.order()); return buf; }