com.jbase.jremote.io
Class NIOJBaseObjectReader
java.lang.Object
com.jbase.jremote.io.AbstractJBaseObjectReader
com.jbase.jremote.io.NIOJBaseObjectReader
- All Implemented Interfaces:
- JBaseObjectReader
public class NIOJBaseObjectReader
- extends AbstractJBaseObjectReader
jBase object reader based on the new Java IO.
- Author:
- aphethean
Field Summary |
static long |
READ_TIMEOUT
The temporary selectors read timeout. |
Methods inherited from class com.jbase.jremote.io.AbstractJBaseObjectReader |
bufferedRead, checkBuffer, readByteObject, readBytes, readInt, readJBaseSerializableObject, readObject, readObject, readObject, readRootObject, readString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
READ_TIMEOUT
public static final long READ_TIMEOUT
- The temporary selectors read timeout. 30 seconds.
- See Also:
- Constant Field Values
NIOJBaseObjectReader
public NIOJBaseObjectReader(ObjectFactory factory,
SocketChannel channel)
getObjectFactory
public ObjectFactory getObjectFactory()
- Description copied from class:
AbstractJBaseObjectReader
- This method must be implemented by concrete ObjectReaders.
- Specified by:
getObjectFactory
in class AbstractJBaseObjectReader
- Returns:
- an instance of a class implementing JBaseSerializable
close
public void close()
throws IOException
- Specified by:
close
in interface JBaseObjectReader
- Specified by:
close
in class AbstractJBaseObjectReader
- Throws:
IOException
getByte
protected byte getByte()
throws IOException
- Specified by:
getByte
in class AbstractJBaseObjectReader
- Throws:
IOException
getInt
protected int getInt()
throws IOException
- Specified by:
getInt
in class AbstractJBaseObjectReader
- Throws:
IOException
getBytes
protected int getBytes(byte[] buf)
throws IOException
- Specified by:
getBytes
in class AbstractJBaseObjectReader
- Throws:
IOException
getBytes
protected int getBytes(ByteBuffer bBuf)
throws IOException
- Specified by:
getBytes
in class AbstractJBaseObjectReader
- Throws:
IOException
inBytes
protected int inBytes(int numberOfBytesToRead)
throws IOException
- Specified by:
inBytes
in class AbstractJBaseObjectReader
- Throws:
IOException
readUTF
protected String readUTF()
throws IOException
- Specified by:
readUTF
in class AbstractJBaseObjectReader
- Throws:
IOException
doRead
protected int doRead(int numberOfBytes)
throws IOException
- Read bytes using the read a temporary Selector
- Throws:
IOException
checkBuffer
protected void checkBuffer(int newDataLength)
isClosed
public boolean isClosed()
setSocketChannel
public void setSocketChannel(SocketChannel socketChannel)
Copyright © 2016 TEMENOS. All Rights Reserved.