Summary
Public Methods |
final
MappedByteBuffer
|
force()
Forces any changes made to this buffer's content to be written to the
storage device containing the mapped file.
|
final
boolean
|
isLoaded()
Tells whether or not this buffer's content is resident in physical
memory.
|
final
MappedByteBuffer
|
load()
Loads this buffer's content into physical memory.
|
[Expand]
Inherited Methods |
From class
java.nio.ByteBuffer
static
ByteBuffer
|
allocate(int arg0)
|
static
ByteBuffer
|
allocateDirect(int arg0)
|
Object
|
array()
Returns the array that backs this
buffer (optional operation).
|
final
int
|
arrayOffset()
Returns the offset within this buffer's backing array of the first
element of the buffer (optional operation).
|
abstract
CharBuffer
|
asCharBuffer()
|
abstract
DoubleBuffer
|
asDoubleBuffer()
|
abstract
FloatBuffer
|
asFloatBuffer()
|
abstract
IntBuffer
|
asIntBuffer()
|
abstract
LongBuffer
|
asLongBuffer()
|
abstract
ByteBuffer
|
asReadOnlyBuffer()
|
abstract
ShortBuffer
|
asShortBuffer()
|
abstract
ByteBuffer
|
compact()
|
int
|
compareTo(ByteBuffer arg0)
|
int
|
compareTo(Object arg0)
|
abstract
ByteBuffer
|
duplicate()
|
boolean
|
equals(Object arg0)
Indicates whether some other object is "equal to" this one.
|
abstract
byte
|
get()
|
ByteBuffer
|
get(byte[] arg0, int arg1, int arg2)
|
ByteBuffer
|
get(byte[] arg0)
|
abstract
byte
|
get(int arg0)
|
abstract
char
|
getChar()
|
abstract
char
|
getChar(int arg0)
|
abstract
double
|
getDouble()
|
abstract
double
|
getDouble(int arg0)
|
abstract
float
|
getFloat(int arg0)
|
abstract
float
|
getFloat()
|
abstract
int
|
getInt()
|
abstract
int
|
getInt(int arg0)
|
abstract
long
|
getLong()
|
abstract
long
|
getLong(int arg0)
|
abstract
short
|
getShort(int arg0)
|
abstract
short
|
getShort()
|
final
boolean
|
hasArray()
Tells whether or not this buffer is backed by an accessible
array.
|
int
|
hashCode()
Returns a hash code value for the object.
|
abstract
boolean
|
isDirect()
Tells whether or not this buffer is
direct.
|
final
ByteBuffer
|
order(ByteOrder arg0)
|
final
ByteOrder
|
order()
|
abstract
ByteBuffer
|
put(byte arg0)
|
ByteBuffer
|
put(byte[] arg0, int arg1, int arg2)
|
abstract
ByteBuffer
|
put(int arg0, byte arg1)
|
final
ByteBuffer
|
put(byte[] arg0)
|
ByteBuffer
|
put(ByteBuffer arg0)
|
abstract
ByteBuffer
|
putChar(int arg0, char arg1)
|
abstract
ByteBuffer
|
putChar(char arg0)
|
abstract
ByteBuffer
|
putDouble(int arg0, double arg1)
|
abstract
ByteBuffer
|
putDouble(double arg0)
|
abstract
ByteBuffer
|
putFloat(int arg0, float arg1)
|
abstract
ByteBuffer
|
putFloat(float arg0)
|
abstract
ByteBuffer
|
putInt(int arg0)
|
abstract
ByteBuffer
|
putInt(int arg0, int arg1)
|
abstract
ByteBuffer
|
putLong(long arg0)
|
abstract
ByteBuffer
|
putLong(int arg0, long arg1)
|
abstract
ByteBuffer
|
putShort(int arg0, short arg1)
|
abstract
ByteBuffer
|
putShort(short arg0)
|
abstract
ByteBuffer
|
slice()
|
String
|
toString()
Returns a string representation of the object.
|
static
ByteBuffer
|
wrap(byte[] arg0)
|
static
ByteBuffer
|
wrap(byte[] arg0, int arg1, int arg2)
|
|
From class
java.nio.Buffer
abstract
Object
|
array()
Returns the array that backs this
buffer (optional operation).
|
abstract
int
|
arrayOffset()
Returns the offset within this buffer's backing array of the first
element of the buffer (optional operation).
|
final
int
|
capacity()
Returns this buffer's capacity.
|
final
Buffer
|
clear()
Clears this buffer.
|
final
Buffer
|
flip()
Flips this buffer.
|
abstract
boolean
|
hasArray()
Tells whether or not this buffer is backed by an accessible
array.
|
final
boolean
|
hasRemaining()
Tells whether there are any elements between the current position and
the limit.
|
abstract
boolean
|
isDirect()
Tells whether or not this buffer is
direct.
|
abstract
boolean
|
isReadOnly()
Tells whether or not this buffer is read-only.
|
final
int
|
limit()
Returns this buffer's limit.
|
final
Buffer
|
limit(int newLimit)
Sets this buffer's limit.
|
final
Buffer
|
mark()
Sets this buffer's mark at its position.
|
final
Buffer
|
position(int newPosition)
Sets this buffer's position.
|
final
int
|
position()
Returns this buffer's position.
|
final
int
|
remaining()
Returns the number of elements between the current position and the
limit.
|
final
Buffer
|
reset()
Resets this buffer's position to the previously-marked position.
|
final
Buffer
|
rewind()
Rewinds this buffer.
|
|
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
From interface
java.lang.Comparable
abstract
int
|
compareTo(T o)
Compares this object with the specified object for order.
|
|
Public Methods
Forces any changes made to this buffer's content to be written to the
storage device containing the mapped file.
If the file mapped into this buffer resides on a local storage
device then when this method returns it is guaranteed that all changes
made to the buffer since it was created, or since this method was last
invoked, will have been written to that device.
If the file does not reside on a local device then no such guarantee
is made.
If this buffer was not mapped in read/write mode (READ_WRITE
) then invoking this
method has no effect.
public
final
boolean
isLoaded
()
Tells whether or not this buffer's content is resident in physical
memory.
A return value of true implies that it is highly likely
that all of the data in this buffer is resident in physical memory and
may therefore be accessed without incurring any virtual-memory page
faults or I/O operations. A return value of false does not
necessarily imply that the buffer's content is not resident in physical
memory.
The returned value is a hint, rather than a guarantee, because the
underlying operating system may have paged out some of the buffer's data
by the time that an invocation of this method returns.
Returns
- true if it is likely that this buffer's content
is resident in physical memory
Loads this buffer's content into physical memory.
This method makes a best effort to ensure that, when it returns,
this buffer's content is resident in physical memory. Invoking this
method may cause some number of page faults and I/O operations to
occur.