|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.nio.Buffer
public abstract class Buffer
Method Summary | |
---|---|
int |
capacity()
Retrieves the capacity of the buffer. |
Buffer |
clear()
Clears the buffer. |
Buffer |
flip()
Flips the buffer. |
boolean |
hasRemaining()
Tells whether the buffer has remaining data to read or not. |
abstract boolean |
isReadOnly()
Tells whether this buffer is read only or not. |
int |
limit()
Retrieves the current limit of the buffer. |
Buffer |
limit(int newLimit)
Sets this buffer's limit. |
Buffer |
mark()
Sets this buffer's mark at its position. |
int |
position()
Retrieves the current position of this buffer. |
Buffer |
position(int newPosition)
Sets this buffer's position. |
int |
remaining()
Returns the number of elements between the current position and the limit. |
Buffer |
reset()
Resets this buffer's position to the previously-marked position. |
Buffer |
rewind()
Rewinds this buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public final int capacity()
public final Buffer clear()
public final Buffer flip()
public final boolean hasRemaining()
public abstract boolean isReadOnly()
public final int limit()
public final Buffer limit(int newLimit)
newLimit
- The new limit value; must be non-negative and no larger
than this buffer's capacity.
IllegalArgumentException
- If the preconditions on newLimit
do not hold.public final Buffer mark()
public final int position()
public final Buffer position(int newPosition)
newPosition
- The new position value; must be non-negative and no
larger than the current limit.
IllegalArgumentException
- If the preconditions on newPosition
do not holdpublic final int remaining()
public final Buffer reset()
InvalidMarkException
- If the mark has not been set.public final Buffer rewind()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |