jremote jbase5.2.1

com.jbase.jremote.io
Class IOJBaseObjectReader

java.lang.Object
  extended by com.jbase.jremote.io.AbstractJBaseObjectReader
      extended by com.jbase.jremote.io.IOJBaseObjectReader
All Implemented Interfaces:
JBaseObjectReader

public class IOJBaseObjectReader
extends AbstractJBaseObjectReader

jBase object reader based on the DataInputStream.

Author:
aphethean

Field Summary
 
Fields inherited from class com.jbase.jremote.io.AbstractJBaseObjectReader
log
 
Constructor Summary
protected IOJBaseObjectReader()
           
  IOJBaseObjectReader(ObjectFactory factory, byte[] b)
          Constructor FOR TESTING ONLY.
  IOJBaseObjectReader(ObjectFactory factory, InputStream is)
           
 
Method Summary
protected  int bufferedRead()
           
 void close()
           
protected  byte getByte()
           
protected  int getBytes(byte[] buf)
           
protected  int getBytes(ByteBuffer bBuf)
           
protected  int getInt()
           
 ObjectFactory getObjectFactory()
          This method must be implemented by concrete ObjectReaders.
protected  int inBytes(int numberOfBytesToRead)
           
protected  boolean isClosed()
           
 boolean isUnpackRequired()
           
protected  String readUTF()
           
 void unpack()
           
 
Methods inherited from class com.jbase.jremote.io.AbstractJBaseObjectReader
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
 

Constructor Detail

IOJBaseObjectReader

protected IOJBaseObjectReader()

IOJBaseObjectReader

public IOJBaseObjectReader(ObjectFactory factory,
                           InputStream is)

IOJBaseObjectReader

public IOJBaseObjectReader(ObjectFactory factory,
                           byte[] b)
Constructor FOR TESTING ONLY. Constructe the buffer and writes the info passed into it. i.e. simulates this data arriving over the wire.

Method Detail

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

readUTF

protected String readUTF()
                  throws IOException
Specified by:
readUTF in class AbstractJBaseObjectReader
Throws:
IOException

inBytes

protected int inBytes(int numberOfBytesToRead)
               throws IOException
Specified by:
inBytes in class AbstractJBaseObjectReader
Throws:
IOException

isClosed

protected boolean isClosed()

bufferedRead

protected int bufferedRead()
                    throws IOException
Overrides:
bufferedRead in class AbstractJBaseObjectReader
Throws:
IOException

unpack

public void unpack()
            throws IOException
Throws:
IOException

isUnpackRequired

public boolean isUnpackRequired()
                         throws IOException
Throws:
IOException

jremote jbase5.2.1

Copyright © 2016 TEMENOS. All Rights Reserved.