API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.nio. Buffer View Source
Author(s)
Mark Reinhold
JSR-51 Expert Group
Since
1.4
Version
1.38, 05/12/20
Serial
Hierarchy
 Object
      Buffer
Implements
Subclasses
Description
publicabstract abstract class Buffer
  A container for data of a specific primitive type.
See also:   
Constructors
pack-private Buffer (int mark, int pos, int lim, int cap)
Methods
Hide/Show inherited methods
publicabstract Object array ()
  Returns the array that backs this buffer  (optional operation).
publicabstract int arrayOffset ()
  Returns the offset within this buffer's backing array of the first element of the buffer  (optional operation).
publicfinal int capacity ()
  Returns this buffer's capacity.
pack-privatestatic void checkBounds (int off, int len, int size)
pack-privatefinal int checkIndex (int i)
Checks the given index against the limit, throwing an IndexOutOfBoundsException if it is not smaller than the limit or is smaller than zero.
pack-privatefinal int checkIndex (int i, int nb)
publicfinal Buffer clear ()
  Clears this buffer.
publicfinal Buffer flip ()
  Flips this buffer.
publicabstract boolean hasArray ()
  Tells whether or not this buffer is backed by an accessible array.
publicfinal boolean hasRemaining ()
  Tells whether there are any elements between the current position and the limit.
publicabstract boolean isDirect ()
  Tells whether or not this buffer is direct.
publicabstract boolean isReadOnly ()
  Tells whether or not this buffer is read-only.
publicfinal int limit ()
  Returns this buffer's limit.
publicfinal Buffer limit (int newLimit)
  Sets this buffer's limit.
publicfinal Buffer mark ()
  Sets this buffer's mark at its position.
pack-privatefinal int markValue ()
pack-privatefinal int nextGetIndex ()
  Checks the current position against the limit, throwing a BufferUnderflowException if it is not smaller than the limit, and then increments the position.
pack-privatefinal int nextGetIndex (int nb)
pack-privatefinal int nextPutIndex ()
  Checks the current position against the limit, throwing a BufferOverflowException if it is not smaller than the limit, and then increments the position.
pack-privatefinal int nextPutIndex (int nb)
publicfinal int position ()
  Returns this buffer's position.
publicfinal Buffer position (int newPosition)
  Sets this buffer's position.
publicfinal int remaining ()
  Returns the number of elements between the current position and the limit.
publicfinal Buffer reset ()
  Resets this buffer's position to the previously-marked position.
publicfinal Buffer rewind ()
  Rewinds this buffer.
Fields
Hide/Show inherited fields
pack-private long address
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar