|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.trendrr.oss.networking.AsynchBuffer
public class AsynchBuffer
| Constructor Summary | |
|---|---|
AsynchBuffer()
|
|
| Method Summary | |
|---|---|
void |
close()
closes the buffer. |
int |
getBytesPerRead()
|
boolean |
hasCallbacksWaiting()
|
void |
process()
attempts to read the requested data from the buffers. |
int |
read(java.nio.channels.ReadableByteChannel channel)
reads one buffer (or less) worth of bytes from the channel. |
byte[] |
readBytes(int numBytes)
|
void |
readBytes(int numBytes,
ByteReadCallback callback)
reads the specified number of bytes from the channel, calls the callback when requested bytes are available. |
java.lang.String |
readUntil(java.lang.String delimiter,
java.nio.charset.Charset charset)
reads until the requested delimiter. |
void |
readUntil(java.lang.String delimiter,
java.nio.charset.Charset charset,
StringReadCallback callback)
Reads from the socketchannel until the delimiter is encountered. |
void |
setBytesPerRead(int bytesPerRead)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AsynchBuffer()
| Method Detail |
|---|
public void readUntil(java.lang.String delimiter,
java.nio.charset.Charset charset,
StringReadCallback callback)
delimiter - callback - charset -
public java.lang.String readUntil(java.lang.String delimiter,
java.nio.charset.Charset charset)
throws TrendrrException
dilimiter - charset -
TrendrrException
public void readBytes(int numBytes,
ByteReadCallback callback)
numBytes - callback -
public byte[] readBytes(int numBytes)
throws TrendrrException
TrendrrException
public int read(java.nio.channels.ReadableByteChannel channel)
throws TrendrrDisconnectedException,
TrendrrException
channel -
TrendrrException
TrendrrDisconnectedExceptionpublic int getBytesPerRead()
public void setBytesPerRead(int bytesPerRead)
public void process()
public void close()
public boolean hasCallbacksWaiting()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||