MappedByteBuffer (Java Platform SE 7 ) (original) (raw)
- java.nio.Buffer
- java.nio.ByteBuffer
- java.nio.MappedByteBuffer
- java.nio.ByteBuffer
All Implemented Interfaces:
Comparable<ByteBuffer>
public abstract class MappedByteBuffer
extends ByteBuffer
Since:
1.4
Method Summary
Methods
Modifier and Type Method and Description MappedByteBuffer force() Forces any changes made to this buffer's content to be written to the storage device containing the mapped file. boolean isLoaded() Tells whether or not this buffer's content is resident in physical memory. MappedByteBuffer load() Loads this buffer's content into physical memory. * ### Methods inherited from class java.nio.[ByteBuffer](../../java/nio/ByteBuffer.html "class in java.nio") `[allocate](../../java/nio/ByteBuffer.html#allocate%28int%29), [allocateDirect](../../java/nio/ByteBuffer.html#allocateDirect%28int%29), [array](../../java/nio/ByteBuffer.html#array%28%29), [arrayOffset](../../java/nio/ByteBuffer.html#arrayOffset%28%29), [asCharBuffer](../../java/nio/ByteBuffer.html#asCharBuffer%28%29), [asDoubleBuffer](../../java/nio/ByteBuffer.html#asDoubleBuffer%28%29), [asFloatBuffer](../../java/nio/ByteBuffer.html#asFloatBuffer%28%29), [asIntBuffer](../../java/nio/ByteBuffer.html#asIntBuffer%28%29), [asLongBuffer](../../java/nio/ByteBuffer.html#asLongBuffer%28%29), [asReadOnlyBuffer](../../java/nio/ByteBuffer.html#asReadOnlyBuffer%28%29), [asShortBuffer](../../java/nio/ByteBuffer.html#asShortBuffer%28%29), [compact](../../java/nio/ByteBuffer.html#compact%28%29), [compareTo](../../java/nio/ByteBuffer.html#compareTo%28java.nio.ByteBuffer%29), [duplicate](../../java/nio/ByteBuffer.html#duplicate%28%29), [equals](../../java/nio/ByteBuffer.html#equals%28java.lang.Object%29), [get](../../java/nio/ByteBuffer.html#get%28%29), [get](../../java/nio/ByteBuffer.html#get%28byte[]%29), [get](../../java/nio/ByteBuffer.html#get%28byte[],%20int,%20int%29), [get](../../java/nio/ByteBuffer.html#get%28int%29), [getChar](../../java/nio/ByteBuffer.html#getChar%28%29), [getChar](../../java/nio/ByteBuffer.html#getChar%28int%29), [getDouble](../../java/nio/ByteBuffer.html#getDouble%28%29), [getDouble](../../java/nio/ByteBuffer.html#getDouble%28int%29), [getFloat](../../java/nio/ByteBuffer.html#getFloat%28%29), [getFloat](../../java/nio/ByteBuffer.html#getFloat%28int%29), [getInt](../../java/nio/ByteBuffer.html#getInt%28%29), [getInt](../../java/nio/ByteBuffer.html#getInt%28int%29), [getLong](../../java/nio/ByteBuffer.html#getLong%28%29), [getLong](../../java/nio/ByteBuffer.html#getLong%28int%29), [getShort](../../java/nio/ByteBuffer.html#getShort%28%29), [getShort](../../java/nio/ByteBuffer.html#getShort%28int%29), [hasArray](../../java/nio/ByteBuffer.html#hasArray%28%29), [hashCode](../../java/nio/ByteBuffer.html#hashCode%28%29), [isDirect](../../java/nio/ByteBuffer.html#isDirect%28%29), [order](../../java/nio/ByteBuffer.html#order%28%29), [order](../../java/nio/ByteBuffer.html#order%28java.nio.ByteOrder%29), [put](../../java/nio/ByteBuffer.html#put%28byte%29), [put](../../java/nio/ByteBuffer.html#put%28byte[]%29), [put](../../java/nio/ByteBuffer.html#put%28byte[],%20int,%20int%29), [put](../../java/nio/ByteBuffer.html#put%28java.nio.ByteBuffer%29), [put](../../java/nio/ByteBuffer.html#put%28int,%20byte%29), [putChar](../../java/nio/ByteBuffer.html#putChar%28char%29), [putChar](../../java/nio/ByteBuffer.html#putChar%28int,%20char%29), [putDouble](../../java/nio/ByteBuffer.html#putDouble%28double%29), [putDouble](../../java/nio/ByteBuffer.html#putDouble%28int,%20double%29), [putFloat](../../java/nio/ByteBuffer.html#putFloat%28float%29), [putFloat](../../java/nio/ByteBuffer.html#putFloat%28int,%20float%29), [putInt](../../java/nio/ByteBuffer.html#putInt%28int%29), [putInt](../../java/nio/ByteBuffer.html#putInt%28int,%20int%29), [putLong](../../java/nio/ByteBuffer.html#putLong%28int,%20long%29), [putLong](../../java/nio/ByteBuffer.html#putLong%28long%29), [putShort](../../java/nio/ByteBuffer.html#putShort%28int,%20short%29), [putShort](../../java/nio/ByteBuffer.html#putShort%28short%29), [slice](../../java/nio/ByteBuffer.html#slice%28%29), [toString](../../java/nio/ByteBuffer.html#toString%28%29), [wrap](../../java/nio/ByteBuffer.html#wrap%28byte[]%29), [wrap](../../java/nio/ByteBuffer.html#wrap%28byte[],%20int,%20int%29)` * ### Methods inherited from class java.nio.[Buffer](../../java/nio/Buffer.html "class in java.nio") `[capacity](../../java/nio/Buffer.html#capacity%28%29), [clear](../../java/nio/Buffer.html#clear%28%29), [flip](../../java/nio/Buffer.html#flip%28%29), [hasRemaining](../../java/nio/Buffer.html#hasRemaining%28%29), [isReadOnly](../../java/nio/Buffer.html#isReadOnly%28%29), [limit](../../java/nio/Buffer.html#limit%28%29), [limit](../../java/nio/Buffer.html#limit%28int%29), [mark](../../java/nio/Buffer.html#mark%28%29), [position](../../java/nio/Buffer.html#position%28%29), [position](../../java/nio/Buffer.html#position%28int%29), [remaining](../../java/nio/Buffer.html#remaining%28%29), [reset](../../java/nio/Buffer.html#reset%28%29), [rewind](../../java/nio/Buffer.html#rewind%28%29)` * ### Methods inherited from class java.lang.[Object](../../java/lang/Object.html "class in java.lang") `[clone](../../java/lang/Object.html#clone%28%29), [finalize](../../java/lang/Object.html#finalize%28%29), [getClass](../../java/lang/Object.html#getClass%28%29), [notify](../../java/lang/Object.html#notify%28%29), [notifyAll](../../java/lang/Object.html#notifyAll%28%29), [wait](../../java/lang/Object.html#wait%28%29), [wait](../../java/lang/Object.html#wait%28long%29), [wait](../../java/lang/Object.html#wait%28long,%20int%29)`Method Detail
* #### isLoaded 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 * #### load public final [MappedByteBuffer](../../java/nio/MappedByteBuffer.html "class in java.nio") load() 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. Returns: This buffer * #### force public final [MappedByteBuffer](../../java/nio/MappedByteBuffer.html "class in java.nio") force() 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 ([FileChannel.MapMode.READ\_WRITE](../../java/nio/channels/FileChannel.MapMode.html#READ%5FWRITE)) then invoking this method has no effect. Returns: This buffer
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2020, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.