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, java.io.InputStream is)
           
 
Method Summary
protected  int bufferedRead()
           
 void close()
           
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)
           
protected  boolean isClosed()
           
 boolean isUnpackRequired()
           
protected  java.lang.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,
                           java.io.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 java.io.IOException
Specified by:
close in interface JBaseObjectReader
Specified by:
close in class AbstractJBaseObjectReader
Throws:
java.io.IOException

getByte

protected byte getByte()
                throws java.io.IOException
Specified by:
getByte in class AbstractJBaseObjectReader
Throws:
java.io.IOException

getInt

protected int getInt()
              throws java.io.IOException
Specified by:
getInt in class AbstractJBaseObjectReader
Throws:
java.io.IOException

getBytes

protected int getBytes(byte[] buf)
                throws java.io.IOException
Specified by:
getBytes in class AbstractJBaseObjectReader
Throws:
java.io.IOException

getBytes

protected int getBytes(java.nio.ByteBuffer bBuf)
                throws java.io.IOException
Specified by:
getBytes in class AbstractJBaseObjectReader
Throws:
java.io.IOException

readUTF

protected java.lang.String readUTF()
                            throws java.io.IOException
Specified by:
readUTF in class AbstractJBaseObjectReader
Throws:
java.io.IOException

inBytes

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

isClosed

protected boolean isClosed()

bufferedRead

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

unpack

public void unpack()
            throws java.io.IOException
Throws:
java.io.IOException

isUnpackRequired

public boolean isUnpackRequired()
                         throws java.io.IOException
Throws:
java.io.IOException

jremote jbase5.2.1

Copyright © 2010 TEMENOS. All Rights Reserved.