|
|||||||||
| Home >> All >> java >> [ nio overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.nio
Class CharBufferImpl

java.lang.Objectjava.nio.Buffer
java.nio.CharBuffer
java.nio.CharBufferImpl
- All Implemented Interfaces:
- java.lang.CharSequence, java.lang.Comparable
- final class CharBufferImpl
- extends CharBuffer
This is a Heap memory implementation
| Field Summary | |
private boolean |
readOnly
|
| Fields inherited from class java.nio.CharBuffer |
array_offset, backing_buffer |
| Fields inherited from class java.nio.Buffer |
address, cap, limit, mark, pos |
| Constructor Summary | |
(package private) |
CharBufferImpl(char[] buffer,
int offset,
int capacity,
int limit,
int position,
int mark,
boolean readOnly)
|
|
CharBufferImpl(CharBufferImpl copy)
|
(package private) |
CharBufferImpl(int capacity)
|
| 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. |
char |
get()
Reads the char at this buffer's current position,
and then increments the position. |
CharBuffer |
get(char[] dst,
int offset,
int length)
Bulk get, overloaded for speed. |
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)
Relative put method. |
CharBuffer |
put(char[] src,
int offset,
int length)
Bulk put, overloaded for speed. |
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, hasArray, hashCode, length, 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 |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
readOnly
private boolean readOnly
| Constructor Detail |
CharBufferImpl
CharBufferImpl(int capacity)
CharBufferImpl
CharBufferImpl(char[] buffer,
int offset,
int capacity,
int limit,
int position,
int mark,
boolean readOnly)
CharBufferImpl
public CharBufferImpl(CharBufferImpl copy)
| Method Detail |
isReadOnly
public boolean isReadOnly()
- Description copied from class:
Buffer - Tells whether this buffer is read only or not.
- Specified by:
isReadOnlyin classBuffer
slice
public CharBuffer slice()
- Description copied from class:
CharBuffer - Creates a new
CharBufferwhose content is a shared subsequence of this buffer's content.- Specified by:
slicein classCharBuffer
duplicate
public CharBuffer duplicate()
- Description copied from class:
CharBuffer - Creates a new
CharBufferthat shares this buffer's content.- Specified by:
duplicatein classCharBuffer
asReadOnlyBuffer
public CharBuffer asReadOnlyBuffer()
- Description copied from class:
CharBuffer - Creates a new read-only
CharBufferthat shares this buffer's content.- Specified by:
asReadOnlyBufferin classCharBuffer
compact
public CharBuffer compact()
- Description copied from class:
CharBuffer - Compacts this buffer.
- Specified by:
compactin classCharBuffer
isDirect
public boolean isDirect()
- Description copied from class:
CharBuffer - Tells wether or not this buffer is direct.
- Specified by:
isDirectin classCharBuffer
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:
subSequencein interfacejava.lang.CharSequence- Specified by:
subSequencein classCharBuffer
get
public char get()
- Reads the
charat this buffer's current position, and then increments the position.- Specified by:
getin classCharBuffer
put
public CharBuffer put(char value)
- Relative put method. Writes
valueto the next position in the buffer.- Specified by:
putin classCharBuffer
get
public char get(int index)
- Absolute get method. Reads the
charat positionindex.- Specified by:
getin classCharBuffer
get
public CharBuffer get(char[] dst, int offset, int length)
- Bulk get, overloaded for speed.
- Overrides:
getin classCharBuffer
put
public CharBuffer put(char[] src, int offset, int length)
- Bulk put, overloaded for speed.
- Overrides:
putin classCharBuffer
put
public CharBuffer put(int index, char value)
- Absolute put method. Writes
valueto positionindexin the buffer.- Specified by:
putin classCharBuffer
order
public ByteOrder order()
- Description copied from class:
CharBuffer - Returns the byte order of this buffer.
- Specified by:
orderin classCharBuffer
|
|||||||||
| Home >> All >> java >> [ nio overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC