public class ByteBufferImpl extends Object implements ByteBuffer
Modifier and Type | Class and Description |
---|---|
static class |
ByteBufferImpl.Externalizer |
Modifier and Type | Field and Description |
---|---|
static ByteBufferImpl |
EMPTY_INSTANCE |
Modifier and Type | Method and Description |
---|---|
ByteBufferImpl |
copy()
Returns a new byte[] instance of size
ByteBuffer.getLength() that contains all the bytes owned by this buffer. |
static ByteBufferImpl |
create(byte[] array) |
static ByteBufferImpl |
create(byte[] array,
int offset,
int length) |
boolean |
equals(Object o) |
byte[] |
getBuf()
Returns the underlying buffer.
|
int |
getLength()
Length bytes, starting from offset, within the underlying byte[] (as returned by
ByteBuffer.getBuf() are owned
by this buffer instance. |
int |
getOffset()
Returns the offset within the underlying byte[] (as returned by
ByteBuffer.getBuf() owned by this buffer instance. |
InputStream |
getStream() |
int |
hashCode() |
ByteBuffer |
toJDKByteBuffer() |
String |
toString() |
public static final ByteBufferImpl EMPTY_INSTANCE
public static ByteBufferImpl create(byte[] array)
public static ByteBufferImpl create(byte[] array, int offset, int length)
public byte[] getBuf()
ByteBuffer
getBuf
in interface ByteBuffer
public int getOffset()
ByteBuffer
ByteBuffer.getBuf()
owned by this buffer instance.getOffset
in interface ByteBuffer
public int getLength()
ByteBuffer
ByteBuffer.getBuf()
are owned
by this buffer instance.getLength
in interface ByteBuffer
public ByteBufferImpl copy()
ByteBuffer
ByteBuffer.getLength()
that contains all the bytes owned by this buffer.copy
in interface ByteBuffer
public InputStream getStream()
public ByteBuffer toJDKByteBuffer()
Copyright © 2021 JBoss by Red Hat. All rights reserved.