| java.lang.Object java.nio.Buffer java.nio.ByteBuffer java.nio.MappedByteBuffer
All known Subclasses: java.nio.MappedByteBufferAdapter,
MappedByteBuffer | abstract public class MappedByteBuffer extends ByteBuffer (Code) | | MappedByteBuffer is a special kind of direct byte buffer,
which maps a region of file to memory.
MappedByteBuffer can be created by calling
java.nio.channels.FileChannel.map(java.nio.channels.FileChannel.MapModelonglong) FileChannel.map .
Once created, the mapping between the byte buffer and the file region remains
valid until the byte buffer is garbage collected.
All or part of a MappedByteBuffer 's content may change or
become inaccessible at any time, since the mapped file region can be modified
by another thread or process at any time. If this happens, the behavior of
the MappedByteBuffer is undefined.
|
Method Summary | |
final public MappedByteBuffer | force() Writes all changes of the buffer to the mapped file. | final public boolean | isLoaded() Returns true if this buffer's content is loaded. | final public MappedByteBuffer | load() Loads this buffer's content into memory. |
MappedByteBuffer | MappedByteBuffer(PlatformAddress addr, int capa, int offset, int mode)(Code) | | |
force | final public MappedByteBuffer force()(Code) | | Writes all changes of the buffer to the mapped file.
All changes must be written by invoking this method if the mapped file
exists on the local device, otherwise the action can not be specified.
This buffer |
isLoaded | final public boolean isLoaded()(Code) | | Returns true if this buffer's content is loaded.
True if this buffer's content is loaded. |
Methods inherited from java.nio.ByteBuffer | public static ByteBuffer allocate(int capacity)(Code)(Java Doc) public static ByteBuffer allocateDirect(int capacity)(Code)(Java Doc) final public byte[] array()(Code)(Java Doc) final public int arrayOffset()(Code)(Java Doc) abstract public CharBuffer asCharBuffer()(Code)(Java Doc) abstract public DoubleBuffer asDoubleBuffer()(Code)(Java Doc) abstract public FloatBuffer asFloatBuffer()(Code)(Java Doc) abstract public IntBuffer asIntBuffer()(Code)(Java Doc) abstract public LongBuffer asLongBuffer()(Code)(Java Doc) abstract public ByteBuffer asReadOnlyBuffer()(Code)(Java Doc) abstract public ShortBuffer asShortBuffer()(Code)(Java Doc) abstract public ByteBuffer compact()(Code)(Java Doc) public int compareTo(ByteBuffer otherBuffer)(Code)(Java Doc) abstract public ByteBuffer duplicate()(Code)(Java Doc) public boolean equals(Object other)(Code)(Java Doc) abstract public byte get()(Code)(Java Doc) public ByteBuffer get(byte[] dest)(Code)(Java Doc) public ByteBuffer get(byte[] dest, int off, int len)(Code)(Java Doc) abstract public byte get(int index)(Code)(Java Doc) abstract public char getChar()(Code)(Java Doc) abstract public char getChar(int index)(Code)(Java Doc) abstract public double getDouble()(Code)(Java Doc) abstract public double getDouble(int index)(Code)(Java Doc) abstract public float getFloat()(Code)(Java Doc) abstract public float getFloat(int index)(Code)(Java Doc) abstract public int getInt()(Code)(Java Doc) abstract public int getInt(int index)(Code)(Java Doc) abstract public long getLong()(Code)(Java Doc) abstract public long getLong(int index)(Code)(Java Doc) abstract public short getShort()(Code)(Java Doc) abstract public short getShort(int index)(Code)(Java Doc) final public boolean hasArray()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) abstract public boolean isDirect()(Code)(Java Doc) final public ByteOrder order()(Code)(Java Doc) final public ByteBuffer order(ByteOrder byteOrder)(Code)(Java Doc) ByteBuffer orderImpl(ByteOrder byteOrder)(Code)(Java Doc) abstract byte[] protectedArray()(Code)(Java Doc) abstract int protectedArrayOffset()(Code)(Java Doc) abstract boolean protectedHasArray()(Code)(Java Doc) abstract public ByteBuffer put(byte b)(Code)(Java Doc) final public ByteBuffer put(byte[] src)(Code)(Java Doc) public ByteBuffer put(byte[] src, int off, int len)(Code)(Java Doc) public ByteBuffer put(ByteBuffer src)(Code)(Java Doc) abstract public ByteBuffer put(int index, byte b)(Code)(Java Doc) abstract public ByteBuffer putChar(char value)(Code)(Java Doc) abstract public ByteBuffer putChar(int index, char value)(Code)(Java Doc) abstract public ByteBuffer putDouble(double value)(Code)(Java Doc) abstract public ByteBuffer putDouble(int index, double value)(Code)(Java Doc) abstract public ByteBuffer putFloat(float value)(Code)(Java Doc) abstract public ByteBuffer putFloat(int index, float value)(Code)(Java Doc) abstract public ByteBuffer putInt(int value)(Code)(Java Doc) abstract public ByteBuffer putInt(int index, int value)(Code)(Java Doc) abstract public ByteBuffer putLong(long value)(Code)(Java Doc) abstract public ByteBuffer putLong(int index, long value)(Code)(Java Doc) abstract public ByteBuffer putShort(short value)(Code)(Java Doc) abstract public ByteBuffer putShort(int index, short value)(Code)(Java Doc) abstract public ByteBuffer slice()(Code)(Java Doc) public String toString()(Code)(Java Doc) public static ByteBuffer wrap(byte[] array)(Code)(Java Doc) public static ByteBuffer wrap(byte[] array, int start, int len)(Code)(Java Doc)
|
|
|