public interface RawBlock extends RawMemory
RawBlockinterface provides methods to access a continuous range of physical memory (raw memory) as a
RawBlockinstance can be obtained from a
ByteBufferabsolute operations map to physical memory addresses. The
indexvalues are relative to the base address of the raw memory area. The
0corresponds to the base address of the raw memory area.
java.nio.ByteBuffer asDirectBuffer() throws java.io.IOException, UnavailableDeviceException, ClosedDeviceException
RawBlockis mapped to as a direct
ByteBuffer. The byte order of the retrieved buffer will be that of this device unless the byte ordering is not standard (as indicated by the value
Device.MIXED_ENDIAN; in which case the buffer's byte order will be set to
ByteOrder.BIG_ENDIAN. When the returned
ByteBufferinstance is invalidated because the device is either closed or in exclusive use by some other application then an attempt to access the
ByteBufferinstance will not change the buffer's content and will cause a
ClosedDeviceExceptionor some other unspecified exception to be thrown either at the time of the access or at some later time.
ByteBufferfor the complete raw memory area associated with this
java.io.IOException- if some other I/O error occurs.
UnavailableDeviceException- if this device is not currently available - such as it is locked by another application.
ClosedDeviceException- if the device has been closed.
Copyright © 2012, 2014, Oracle and/or its affiliates. All rights reserved.