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, UnavailablePeripheralException, ClosedPeripheralException
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
Peripheral.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 peripheral 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
ClosedPeripheralExceptionor 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.
UnavailablePeripheralException- if this peripheral is not currently available - such as it is locked by another application.
ClosedPeripheralException- if the peripheral has been closed.
Copyright © 2012, 2013, Oracle and/or its affiliates. All rights reserved.