com.sibvisions.rad.remote.serializer
Class AbstractSizedSerializer
java.lang.Object
com.sibvisions.rad.remote.serializer.AbstractSizedSerializer
- Direct Known Subclasses:
- ArraySerializer, BeanTypeSerializer, BooleanArraySerializer, ByteArraySerializer, CharArraySerializer, DecimalSerializer, DoubleArraySerializer, FloatArraySerializer, IntArraySerializer, ListSerializer, LongArraySerializer, MapSerializer, ShortArraySerializer, StringSerializer
public abstract class AbstractSizedSerializer
- extends java.lang.Object
The base serializer for objects with size/length.
|
Method Summary |
int |
readSize(java.io.DataInputStream pIn,
int pTypeValue,
int pMin,
int pMax)
Reads the content length based on the type identifier. |
void |
writeSize(java.io.DataOutputStream pOut,
int pSize,
int pMin,
int pMax)
Writes the type definition which includes the length of the content. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractSizedSerializer
public AbstractSizedSerializer()
readSize
public int readSize(java.io.DataInputStream pIn,
int pTypeValue,
int pMin,
int pMax)
throws java.lang.Exception
- Reads the content length based on the type identifier.
- Parameters:
pIn - input streampTypeValue - type definition with included content lengthpMin - start value for the type definitionpMax - max value for the type definition
- Returns:
- content length
- Throws:
java.lang.Exception - if the content length cannot be calculated
writeSize
public void writeSize(java.io.DataOutputStream pOut,
int pSize,
int pMin,
int pMax)
throws java.lang.Exception
- Writes the type definition which includes the length of the content.
- Parameters:
pOut - output streampSize - length of the contentpMin - start value for the type definitionpMax - max value for the type definition
- Throws:
java.lang.Exception - if it is not possible to write the calculated type definition to the stream
Copyright © 2009 SIB Visions GmbH. All Rights Reserved.