|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.qpid.proton.engine.impl.ssl.ByteHolder
public class ByteHolder
I thinly wrap a ByteBuffer to facilitate its usage e.g. in SimpleSslTransportWrapper.
At a given moment I am either in a state that is ready to be written to, or read from.
To switch between these states, call prepareToRead() or prepareToWrite(), each of which returns the ByteBuffer
ready to be used.
| Constructor Summary | |
|---|---|
ByteHolder(int capacity)
Creates me, initially in a writeable state |
|
| Method Summary | |
|---|---|
int |
getCapacity()
|
boolean |
hasSpace()
|
ByteBuffer |
prepareToRead()
|
ByteBuffer |
prepareToWrite()
prepare me to be written to again |
int |
readInto(byte[] destination,
int offset,
int numberOfBytesRequested)
Read my bytes into the supplied destination |
boolean |
readInto(TransportInput transportInput)
|
int |
writeOutputFrom(TransportOutput transportOutput)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ByteHolder(int capacity)
| Method Detail |
|---|
public boolean hasSpace()
public int writeOutputFrom(TransportOutput transportOutput)
public ByteBuffer prepareToRead()
public int readInto(byte[] destination,
int offset,
int numberOfBytesRequested)
public boolean readInto(TransportInput transportInput)
TransportInput (i.e. returns false if transportInput didn't accept all the bytes)public ByteBuffer prepareToWrite()
public int getCapacity()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||