Android
java.nio
public abstract class

java.nio.MappedByteBuffer

java.lang.Object
java.nio.Buffer
java.nio.ByteBuffer Comparable<T>
java.nio.MappedByteBuffer

MappedByteBuffer is a special kind of direct byte buffer, which maps a region of file to memory.

MappedByteBuffer can be created by calling 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.

Summary

Public Methods

    final      MappedByteBuffer  force()
Writes all changes of the buffer to the mapped file.
    final      boolean  isLoaded()
Returns true if this buffer's content is loaded.
    final      MappedByteBuffer  load()
Loads this buffer's content into memory.
Methods inherited from class java.nio.ByteBuffer
Methods inherited from class java.nio.Buffer
Methods inherited from class java.lang.Object
Methods inherited from interface java.lang.Comparable

Details

Public Methods

public final MappedByteBuffer force()

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.

Returns

  • This buffer

public final boolean isLoaded()

Returns true if this buffer's content is loaded.

Returns

  • True if this buffer's content is loaded.

public final MappedByteBuffer load()

Loads this buffer's content into memory.

Returns

  • This buffer
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48