public class NIOJBaseObjectReader extends AbstractJBaseObjectReader
jBase object reader based on the new Java IO.
Modifier and Type | Field and Description |
---|---|
static long |
READ_TIMEOUT
The temporary selectors read timeout.
|
log
Constructor and Description |
---|
NIOJBaseObjectReader(ObjectFactory factory,
java.nio.channels.SocketChannel channel) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkBuffer(int newDataLength) |
void |
close() |
protected int |
doRead(int numberOfBytes)
Read bytes using the read a temporary Selector
|
protected byte |
getByte() |
protected int |
getBytes(byte[] buf) |
protected int |
getBytes(java.nio.ByteBuffer bBuf) |
protected int |
getInt() |
ObjectFactory |
getObjectFactory()
This method must be implemented by concrete ObjectReaders.
|
protected int |
inBytes(int numberOfBytesToRead) |
boolean |
isClosed() |
protected java.lang.String |
readUTF() |
void |
setSocketChannel(java.nio.channels.SocketChannel socketChannel) |
bufferedRead, checkBuffer, readByteObject, readBytes, readInt, readJBaseSerializableObject, readObject, readObject, readObject, readRootObject, readString
public static final long READ_TIMEOUT
public NIOJBaseObjectReader(ObjectFactory factory, java.nio.channels.SocketChannel channel)
public ObjectFactory getObjectFactory()
AbstractJBaseObjectReader
getObjectFactory
in class AbstractJBaseObjectReader
public void close() throws java.io.IOException
close
in interface JBaseObjectReader
close
in class AbstractJBaseObjectReader
java.io.IOException
protected byte getByte() throws java.io.IOException
getByte
in class AbstractJBaseObjectReader
java.io.IOException
protected int getInt() throws java.io.IOException
getInt
in class AbstractJBaseObjectReader
java.io.IOException
protected int getBytes(byte[] buf) throws java.io.IOException
getBytes
in class AbstractJBaseObjectReader
java.io.IOException
protected int getBytes(java.nio.ByteBuffer bBuf) throws java.io.IOException
getBytes
in class AbstractJBaseObjectReader
java.io.IOException
protected int inBytes(int numberOfBytesToRead) throws java.io.IOException
inBytes
in class AbstractJBaseObjectReader
java.io.IOException
protected java.lang.String readUTF() throws java.io.IOException
readUTF
in class AbstractJBaseObjectReader
java.io.IOException
protected int doRead(int numberOfBytes) throws java.io.IOException
java.io.IOException
protected void checkBuffer(int newDataLength)
public boolean isClosed()
public void setSocketChannel(java.nio.channels.SocketChannel socketChannel)