com.sibvisions.rad.remote.serializer
Class StringSerializer

java.lang.Object
  extended by com.sibvisions.rad.remote.serializer.AbstractSizedSerializer
      extended by com.sibvisions.rad.remote.serializer.StringSerializer
All Implemented Interfaces:
ITypeSerializer<String>

public class StringSerializer
extends AbstractSizedSerializer
implements ITypeSerializer<String>

The serializer for String.


Constructor Summary
StringSerializer()
           
 
Method Summary
 int getMaxValue()
          Gets the maximal value used to detect this type in stream.
 int getMinValue()
          Gets the minimal value used to detect this type in stream.
 Class<String> getTypeClass()
          Gets the type class that can be serialized by this serializer.
 String read(UniversalSerializer pSerializer, DataInputStream pIn, int pTypeValue, TypeCache pCache)
          Reads in a serialized object from a stream.
 void write(UniversalSerializer pSerializer, DataOutputStream pOut, String pObject, TypeCache pCache)
          Writes a serialized object to a stream.
 
Methods inherited from class com.sibvisions.rad.remote.serializer.AbstractSizedSerializer
readSize, writeSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringSerializer

public StringSerializer()
Method Detail

getTypeClass

public Class<String> getTypeClass()
Gets the type class that can be serialized by this serializer.

Specified by:
getTypeClass in interface ITypeSerializer<String>
Returns:
the type class.

getMinValue

public int getMinValue()
Gets the minimal value used to detect this type in stream.

Specified by:
getMinValue in interface ITypeSerializer<String>
Returns:
the minimal value used to detect this type in stream.

getMaxValue

public int getMaxValue()
Gets the maximal value used to detect this type in stream.

Specified by:
getMaxValue in interface ITypeSerializer<String>
Returns:
the maximal value used to detect this type in stream.

read

public String read(UniversalSerializer pSerializer,
                   DataInputStream pIn,
                   int pTypeValue,
                   TypeCache pCache)
            throws Exception
Reads in a serialized object from a stream.

Specified by:
read in interface ITypeSerializer<String>
Parameters:
pSerializer - the universal serializer.
pIn - stream with serialized content
pTypeValue - type value.
pCache - the cache for BeanType definitions
Returns:
deserialized object
Throws:
Exception - if deserialization fails

write

public void write(UniversalSerializer pSerializer,
                  DataOutputStream pOut,
                  String pObject,
                  TypeCache pCache)
           throws Exception
Writes a serialized object to a stream.

Specified by:
write in interface ITypeSerializer<String>
Parameters:
pSerializer - the universal serializer.
pOut - output stream for the object
pObject - serializable object
pCache - the cache for BeanType definitions
Throws:
Exception - if serialization fails


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.