java.nio
Class CharViewBufferImpl

java.lang.Object
java.nio.Buffer
java.nio.CharBuffer
java.nio.CharViewBufferImpl
- All Implemented Interfaces:
- java.lang.CharSequence, java.lang.Comparable
- class CharViewBufferImpl
- extends CharBuffer
|
Method Summary |
CharBuffer |
asReadOnlyBuffer()
Creates a new read-only CharBuffer that shares this
buffer's content. |
CharBuffer |
compact()
Compacts this buffer. |
CharBuffer |
duplicate()
Creates a new CharBuffer that shares this buffer's
content. |
(package private) CharBuffer |
duplicate(boolean readOnly)
|
char |
get()
Reads the char at this buffer's current position,
and then increments the position. |
char |
get(int index)
Absolute get method. |
boolean |
isDirect()
Tells wether or not this buffer is direct. |
boolean |
isReadOnly()
Tells whether this buffer is read only or not. |
ByteOrder |
order()
Returns the byte order of this buffer. |
CharBuffer |
put(char value)
Writes the char at this buffer's current position,
and then increments the position. |
CharBuffer |
put(int index,
char value)
Absolute put method. |
CharBuffer |
slice()
Creates a new CharBuffer whose content is a shared
subsequence of this buffer's content. |
java.lang.CharSequence |
subSequence(int start,
int end)
Creates a new character buffer that represents the specified subsequence
of this buffer, relative to the current position. |
| Methods inherited from class java.nio.CharBuffer |
allocate, array, arrayOffset, charAt, compareTo, equals, get, get, hasArray, hashCode, length, put, put, put, put, put, toString, wrap, wrap, wrap, wrap |
| Methods inherited from class java.nio.Buffer |
capacity, checkArraySize, checkForOverflow, checkForOverflow, checkForUnderflow, checkForUnderflow, checkIfReadOnly, checkIndex, clear, flip, hasRemaining, limit, limit, mark, position, position, remaining, reset, rewind |
offset
private int offset
- Position in bb (i.e. a byte offset) where this buffer starts.
bb
private ByteBuffer bb
readOnly
private boolean readOnly
endian
private ByteOrder endian
CharViewBufferImpl
CharViewBufferImpl(ByteBuffer bb,
int capacity)
CharViewBufferImpl
public CharViewBufferImpl(ByteBuffer bb,
int offset,
int capacity,
int limit,
int position,
int mark,
boolean readOnly,
ByteOrder endian)
get
public char get()
- Reads the
char at this buffer's current position,
and then increments the position.
- Specified by:
get in class CharBuffer
get
public char get(int index)
- Absolute get method. Reads the
char at position
index.
- Specified by:
get in class CharBuffer
put
public CharBuffer put(char value)
- Description copied from class:
CharBuffer
- Writes the
char at this buffer's current position,
and then increments the position.
- Specified by:
put in class CharBuffer
put
public CharBuffer put(int index,
char value)
- Description copied from class:
CharBuffer
- Absolute put method.
- Specified by:
put in class CharBuffer
compact
public CharBuffer compact()
- Description copied from class:
CharBuffer
- Compacts this buffer.
- Specified by:
compact in class CharBuffer
slice
public CharBuffer slice()
- Description copied from class:
CharBuffer
- Creates a new
CharBuffer whose content is a shared
subsequence of this buffer's content.
- Specified by:
slice in class CharBuffer
duplicate
CharBuffer duplicate(boolean readOnly)
duplicate
public CharBuffer duplicate()
- Description copied from class:
CharBuffer
- Creates a new
CharBuffer that shares this buffer's
content.
- Specified by:
duplicate in class CharBuffer
asReadOnlyBuffer
public CharBuffer asReadOnlyBuffer()
- Description copied from class:
CharBuffer
- Creates a new read-only
CharBuffer that shares this
buffer's content.
- Specified by:
asReadOnlyBuffer in class CharBuffer
subSequence
public java.lang.CharSequence subSequence(int start,
int end)
- Description copied from class:
CharBuffer
- Creates a new character buffer that represents the specified subsequence
of this buffer, relative to the current position.
- Specified by:
subSequence in interface java.lang.CharSequence- Specified by:
subSequence in class CharBuffer
isReadOnly
public boolean isReadOnly()
- Description copied from class:
Buffer
- Tells whether this buffer is read only or not.
- Specified by:
isReadOnly in class Buffer
isDirect
public boolean isDirect()
- Description copied from class:
CharBuffer
- Tells wether or not this buffer is direct.
- Specified by:
isDirect in class CharBuffer
order
public ByteOrder order()
- Description copied from class:
CharBuffer
- Returns the byte order of this buffer.
- Specified by:
order in class CharBuffer