Java java.nio CharBuffer fields, constructors, methods, implement or subclass

Example usage for Java java.nio CharBuffer fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.nio CharBuffer.

The text is from its open source code.

Method

CharBufferallocate(int capacity)
Creates a char buffer based on a newly allocated char array.
CharBufferappend(char c)
Writes the given char to the current position and increases the position by 1.
CharBufferappend(CharSequence csq)
Writes all chars of the given character sequence csq to the current position of this buffer, and increases the position by the length of the csq.
CharBufferappend(CharSequence csq, int start, int end)
Writes chars of the given CharSequence to the current position of this buffer, and increases the position by the number of chars written.
char[]array()
Returns the char array which this buffer is based on, if there is one.
intarrayOffset()
Returns the offset of the char array which this buffer is based on, if there is one.
CharBufferasReadOnlyBuffer()
Returns a read-only buffer that shares its content with this buffer.
intcapacity()
Returns the capacity of this buffer.
charcharAt(int index)
Returns the character located at the specified index in the buffer.
Bufferclear()
Clears this buffer.
CharBuffercompact()
Compacts this char buffer.
intcompareTo(CharBuffer otherBuffer)
Compare the remaining chars of this buffer to another char buffer's remaining chars.
CharBufferduplicate()
Returns a duplicated buffer that shares its content with this buffer.
booleanequals(Object other)
Checks whether this char buffer is equal to another object.
Bufferflip()
Flips this buffer.
CharBufferget(char[] dest)
Reads chars from the current position into the specified char array and increases the position by the number of chars read.
charget(int index)
Returns a char at the specified index; the position is not changed.
charget()
Returns the char at the current position and increases the position by 1.
CharBufferget(char[] dest, int off, int len)
Reads chars from the current position into the specified char array, starting from the specified offset, and increases the position by the number of chars read.
booleanhasArray()
Indicates whether this buffer is based on a char array and is read/write.
inthashCode()
Calculates this buffer's hash code from the remaining chars.
booleanhasRemaining()
Indicates if there are elements remaining in this buffer, that is if position < limit .
booleanisDirect()
Indicates whether this buffer is direct.
intlength()
Returns the number of remaining chars.
intlimit()
Returns the limit of this buffer.
Bufferlimit(int newLimit)
Sets the limit of this buffer.
Buffermark()
Marks the current position, so that the position may return to this point later by calling reset().
ByteOrderorder()
Returns the byte order used by this buffer when converting chars from/to bytes.
Bufferposition(int newPosition)
Sets the position of this buffer.
intposition()
Returns the position of this buffer.
CharBufferput(int index, char c)
Writes a char to the specified index of this buffer; the position is not changed.
CharBufferput(char[] src, int off, int len)
Writes chars from the given char array, starting from the specified offset, to the current position and increases the position by the number of chars written.
CharBufferput(String str, int start, int end)
Writes chars of the given string to the current position of this buffer, and increases the position by the number of chars written.
CharBufferput(char c)
Writes the given char to the current position and increases the position by 1.
CharBufferput(char[] src)
Writes chars from the given char array to the current position and increases the position by the number of chars written.
CharBufferput(CharBuffer src)
Writes all the remaining chars of the src char buffer to this buffer's current position, and increases both buffers' position by the number of chars copied.
CharBufferput(String str)
Writes all chars of the given string to the current position of this buffer, and increases the position by the length of string.
intread(CharBuffer target)
Reads characters from this buffer and puts them into target .
intremaining()
Returns the number of remaining elements in this buffer, that is limit - position .
Bufferreset()
Resets the position of this buffer to the mark.
Bufferrewind()
Rewinds this buffer.
CharBufferslice()
Returns a sliced buffer that shares its content with this buffer.
CharSequencesubSequence(int start, int end)
Returns a new char buffer representing a sub-sequence of this buffer's current remaining content.
StringtoString()
Returns a string representing the current remaining chars of this buffer.
CharBufferwrap(char[] array, int start, int len)
Creates a new char buffer by wrapping the given char array.
CharBufferwrap(CharSequence chseq, int start, int end)
Creates a new char buffer by wrapping the given char sequence.
CharBufferwrap(char[] array)
Creates a new char buffer by wrapping the given char array.
CharBufferwrap(CharSequence chseq)
Creates a new char buffer by wrapping the given char sequence.