|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.commons.utils.nio.PooledByteBuffer
public class PooledByteBuffer
The PooledByteBuffer defines the interface to a direct 'native' byte buffer which can be reused again.
| Constructor Summary | |
|---|---|
PooledByteBuffer(int capacity)
|
|
PooledByteBuffer(int capacity,
DirectByteBufferPool pool,
long id)
Only intantiable from the DirectByteBufferPool. |
|
| Method Summary | |
|---|---|
int |
capacity()
call the Buffer.capacity() method. |
void |
clear()
call the Buffer.clear() method. |
boolean |
equals(Object other)
|
void |
free()
Mark this bytebuffer as free. |
ByteBuffer |
getBuffer()
Get the pooled direct, native buffer. |
long |
getId()
|
int |
hashCode()
Implementation as proposed by Joshua Block in Effective Java (Addison-Wesley 2001), which supplies an even distribution and is relatively fast. |
int |
limit()
call the Buffer.limit() method. |
void |
limit(int capacity)
call the Buffer.limit(int) method. |
void |
markAsFree()
Just set the reference to null. |
int |
position()
call the Buffer.position() method. |
void |
position(int position)
call the Buffer.position() method. |
void |
rewind()
call the Buffer.rewind() method. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
PooledByteBuffer(int capacity,
DirectByteBufferPool pool,
long id)
DirectByteBufferPool.
capacity - pool - public PooledByteBuffer(int capacity)
capacity - of the bytebuffer.| Method Detail |
|---|
public ByteBuffer getBuffer()
public void free()
public void markAsFree()
public void rewind()
Buffer.rewind() method.
public void clear()
Buffer.clear() method.
public void limit(int capacity)
Buffer.limit(int) method.
capacity - public int limit()
Buffer.limit() method.
public int capacity()
Buffer.capacity() method.
public int position()
Buffer.position() method.
public void position(int position)
Buffer.position() method.
position - of the buffer.public boolean equals(Object other)
equals in class Objectpublic int hashCode()
Combining the hash code(s) computed above: result = 37 * result + code;
hashCode in class ObjectObject.hashCode()public long getId()
|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||