|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.nio.DirectByteBuffers
class DirectByteBuffers
Helper class for operations on direct ByteBuffer
ByteBuffer| Constructor Summary | |
|---|---|
DirectByteBuffers()
|
|
| Method Summary | |
|---|---|
static void |
free(ByteBuffer directBuffer)
Explicitly frees the memory used by the given direct byte buffer. |
static org.apache.harmony.luni.platform.PlatformAddress |
getEffectiveAddress(ByteBuffer directBuffer)
Returns the platform address of the start of this buffer instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
DirectByteBuffers()
| Method Detail |
|---|
public static void free(ByteBuffer directBuffer)
If the memory is known to already have been freed then this is a no-op.
Once the memory has been freed then operations requiring access to the
memory will throw an IllegalStateException.
Note this is is possible that the memory is freed by code that reaches into the address and explicitly frees it 'beneith' us -- this is bad form.
directBuffer - the direct byte buffer memory to free
IllegalArgumentException - if the buffer is null or is not a
direct byte buffer.public static org.apache.harmony.luni.platform.PlatformAddress getEffectiveAddress(ByteBuffer directBuffer)
If you can guarantee that you want to free the underlying memory call the #free() method on this instance -- generally applications will rely on the garbage collector to autofree this memory.
directBuffer - the direct byte buffer
IllegalStateException - if this buffer address is known to have been freed
previously.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||