Skip to content

Tag Archives: Java-NIO package

The mark() method of java.nio.CharBuffer Class is used to set this buffer’s mark at its position. Syntax: public CharBuffer mark() Return Value: This method returns… Read More
The charAt() method of java.nio.CharBuffer Class is used to read the character at the given index relative to the current position. Syntax: public final char… Read More
The length() method of java.nio.CharBuffer Class is used to return the length of this character buffer. When viewed as a character sequence, the length of… Read More
The chars() method of java.nio.CharBuffer Class is used to return a stream of int zero-extending the char values from this sequence. Any char which maps… Read More
The rewind() method of java.nio.ByteBuffer Class is used to rewind this buffer. The position is set to zero and the mark is discarded. Invoke this… Read More
The duplicate() method of java.nio.Buffer class is used to create a new buffer that shares this buffer’s content. The content of the new buffer will… Read More
The clear() method of java.nio.CharBuffer Class is used to clear this buffer. The position is set to zero, the limit is set to the capacity,… Read More
The hasArray() method of java.nio.Buffer class is used to tell whether or not this buffer is backed by an accessible array. If this method returns… Read More
The flip() method of java.nio.ByteBuffer Class is used to flip this buffer. The limit is set to the current position and then the position is… Read More
The mark() method of java.nio.Buffer Class is used to set this buffer’s mark at its position. Syntax: public Buffer mark() Return Value: This method returns… Read More
The capacity() method of java.nio.Buffer Class is used to return this buffer’s capacity. Syntax: public final int capacity() Return Value: The capacity of this buffer… Read More
The position(int newPosition) method of java.nio.Buffer Class is used to set this buffer’s position. If the mark is defined and larger than the new position… Read More
The clear() method of java.nio.ByteBuffer Class is used to clear this buffer. The position is set to zero, the limit is set to the capacity,… Read More
append(char c) The append(char c) method of java.nio.CharBuffer Class is used to append the specified char to this buffer (optional operation). An invocation of this… Read More
The isReadOnly() method of java.nio.Buffer class is used to tell whether or not this buffer is read-only. Syntax: public abstract boolean isReadOnly() Returns: This method… Read More