jremote jbase5.2.1

com.jbase.jremote.io
Interface JBaseObjectReader

All Known Implementing Classes:
AbstractJBaseObjectReader, IOJBaseObjectReader, NIOJBaseObjectReader

public interface JBaseObjectReader

Deserializes objects sent from the jsqld server. Clients of classes implementing this interface use readObject method to read deserialized objects. This interface is simillar to java.io.ObjectInputStream. It does not extend java.io.ObjectInputStream because that would require handling of the original Java'a serialization protocol on the jsqld server.

Author:
Peter Kuchta, pkuchta@temenos.com

Method Summary
 void close()
           
 byte[] readBytes()
           
 int readInt()
          Reads a 32 bits integer from the underlying InputStream.
 java.lang.Object readObject()
          Reads/deserializes next object.
 IByteObject readObject(IByteObject o)
          Reads/deserializes next byte object, a new IByteObject should be created and returned if a null argument is passed in.
 JBaseSerializable readObject(JBaseSerializable o)
          Reads/deserializes next object, a JBaseSerializable object should be created and returned if a null argument is passed in.
 JBaseSerializable readRootObject()
          Deserializes a root object.
 java.lang.String readString()
          Reads a java.lang.String.
 

Method Detail

readObject

java.lang.Object readObject()
                            throws java.io.IOException,
                                   java.lang.ClassNotFoundException
Reads/deserializes next object. Client should use Java safe cast to cast the object to an expected type.

Throws:
java.io.IOException
java.lang.ClassNotFoundException

readObject

JBaseSerializable readObject(JBaseSerializable o)
                             throws java.io.IOException,
                                    java.lang.ClassNotFoundException
Reads/deserializes next object, a JBaseSerializable object should be created and returned if a null argument is passed in.

Throws:
java.io.IOException
java.lang.ClassNotFoundException

readObject

IByteObject readObject(IByteObject o)
                       throws java.io.IOException
Reads/deserializes next byte object, a new IByteObject should be created and returned if a null argument is passed in.

Throws:
java.io.IOException

readInt

int readInt()
            throws java.io.IOException
Reads a 32 bits integer from the underlying InputStream.

Throws:
java.io.IOException

readString

java.lang.String readString()
                            throws java.io.IOException
Reads a java.lang.String. This method will deserialize and convert to String a JDynArray (a variable of type CVar serialized on the server). It will throw an exception if the object coming from the server is of any other type.

Throws:
java.io.IOException

readBytes

byte[] readBytes()
                 throws java.io.IOException
Throws:
java.io.IOException

readRootObject

JBaseSerializable readRootObject()
                                 throws java.io.IOException,
                                        java.lang.ClassNotFoundException
Deserializes a root object. This method must not be used by implementors of JBaseSerializable (in readObject).

Returns:
an instance of JBaseSerializable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

close

void close()
           throws java.io.IOException
Throws:
java.io.IOException

jremote jbase5.2.1

Copyright © 2010 TEMENOS. All Rights Reserved.