public class DelegatingByteBufferView extends Object implements ByteBufferView
Constructor and Description |
---|
DelegatingByteBufferView(ByteBuffer delegate) |
Modifier and Type | Method and Description |
---|---|
int |
capacity() |
ByteBufferView |
duplicate() |
byte |
get() |
ByteBufferView |
get(byte[] dst) |
int |
getInt() |
short |
getShort() |
boolean |
hasRemaining() |
int |
limit() |
ByteBufferView |
limit(int newLimit) |
int |
position() |
ByteBufferView |
position(int newPosition) |
int |
remaining() |
String |
toString() |
void |
transferTo(ByteBuffer buffer) |
int |
transferTo(FileChannel fc,
long offset)
Transfer the contents of this byte buffer view to the file channel passed in.
|
public DelegatingByteBufferView(ByteBuffer delegate)
public int position()
position
in interface ByteBufferView
public ByteBufferView position(int newPosition)
position
in interface ByteBufferView
public int limit()
limit
in interface ByteBufferView
public ByteBufferView limit(int newLimit)
limit
in interface ByteBufferView
public int capacity()
capacity
in interface ByteBufferView
public boolean hasRemaining()
hasRemaining
in interface ByteBufferView
public int remaining()
remaining
in interface ByteBufferView
public byte get()
get
in interface ByteBufferView
public short getShort()
getShort
in interface ByteBufferView
public int getInt()
getInt
in interface ByteBufferView
public ByteBufferView get(byte[] dst)
get
in interface ByteBufferView
public void transferTo(ByteBuffer buffer)
transferTo
in interface ByteBufferView
public int transferTo(FileChannel fc, long offset) throws IOException
ByteBufferView
transferTo
in interface ByteBufferView
fc
- the file channeloffset
- the offset in the file channelIOException
- on failure to write to the file channelpublic ByteBufferView duplicate()
duplicate
in interface ByteBufferView
Copyright © 2016–2021. All rights reserved.