org.objectweb.cjdbc.driver.protocol
Class SQLDataSerialization.Serializer

java.lang.Object
  extended byorg.objectweb.cjdbc.driver.protocol.SQLDataSerialization.Serializer
Direct Known Subclasses:
SQLDataSerialization.BigDecimalSerializer, SQLDataSerialization.BlobSerializer, SQLDataSerialization.BooleanSerializer, SQLDataSerialization.BytesSerializer, SQLDataSerialization.DateSerializer, SQLDataSerialization.DoubleSerializer, SQLDataSerialization.FloatSerializer, SQLDataSerialization.IntegerSerializer, SQLDataSerialization.LongSerializer, SQLDataSerialization.StringSerializer, SQLDataSerialization.TimeSerializer, SQLDataSerialization.TimestampSerializer
Enclosing class:
SQLDataSerialization

public abstract static class SQLDataSerialization.Serializer
extends java.lang.Object

Abstract class hiding type-specific serialization methods and information


Field Summary
protected  TypeTag typeTag
           
 
Constructor Summary
SQLDataSerialization.Serializer()
           
 
Method Summary
 TypeTag getTypeTag()
           
abstract  java.lang.Object receiveFromStream(CJDBCInputStream input)
          De-serialize an object from the stream Warning: the caller must ensure that Serializer subtype and the incoming object are compatible.
abstract  void sendToStream(java.lang.Object obj, CJDBCOutputStream output)
          Serialize the object to the stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

typeTag

protected TypeTag typeTag
Constructor Detail

SQLDataSerialization.Serializer

public SQLDataSerialization.Serializer()
Method Detail

getTypeTag

public TypeTag getTypeTag()
Returns:
the corresponding TypeTag

sendToStream

public abstract void sendToStream(java.lang.Object obj,
                                  CJDBCOutputStream output)
                           throws java.io.IOException,
                                  java.lang.ClassCastException
Serialize the object to the stream. Warning: the caller must ensure that Serializer subtype and Object subtype are compatible.

Parameters:
obj - object to send
output - Output stream
Throws:
java.io.IOException - stream error
java.lang.ClassCastException - wrong serializer for this object type

receiveFromStream

public abstract java.lang.Object receiveFromStream(CJDBCInputStream input)
                                            throws java.io.IOException
De-serialize an object from the stream Warning: the caller must ensure that Serializer subtype and the incoming object are compatible.

Parameters:
input - Input stream
Returns:
the object received from the stream
Throws:
java.io.IOException - stream error


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.