org.deegree.services.wpvs.io.serializer
Class PrototypeSerializer

java.lang.Object
  extended by org.deegree.services.wpvs.io.serializer.ObjectSerializer<RenderablePrototype>
      extended by org.deegree.services.wpvs.io.serializer.PrototypeSerializer

public class PrototypeSerializer
extends ObjectSerializer<RenderablePrototype>

The PrototypeSerializer class TODO add class documentation here.

Version:
$Revision: 30127 $, $Date: 2011-03-22 11:11:12 +0100 (Tue, 22 Mar 2011) $
Author:
Rutger Bezema, last edited by: $Author: aschmitz $

Constructor Summary
PrototypeSerializer()
          Create a new prototype serializer
 
Method Summary
 RenderablePrototype deserializeDataObject(byte[] buffer)
          Deserialize an object from the given byte array.
 DirectGeometryBuffer getGeometryBuffer()
           
 RenderablePrototype read(ByteBuffer buffer)
          Create a PositionableModel by reading it from the buffer.
 int serializedObjectSize(DataObjectInfo<RenderablePrototype> object)
          Returns the size of the object after serialization, without the header information, just the fields.
 byte[] serializeObject(DataObjectInfo<RenderablePrototype> object)
          Serializes an object using the standard serialization mechanism, ObjectOutputStream
 void setGeometryBuffer(DirectGeometryBuffer geometryBuffer)
           
 void write(ByteBuffer buffer, DataObjectInfo<RenderablePrototype> object)
          Write the given PositionableModel to the buffer.
 
Methods inherited from class org.deegree.services.wpvs.io.serializer.ObjectSerializer
allocateByteBuffer, getHeaderSize, readID, readObjectSize, readString, readTime, sizeOfSerializedObject, sizeOfString, skipHeader, writeHeader, writeString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrototypeSerializer

public PrototypeSerializer()
Create a new prototype serializer

Method Detail

getGeometryBuffer

public final DirectGeometryBuffer getGeometryBuffer()
Returns:
the geometryBuffer

setGeometryBuffer

public final void setGeometryBuffer(DirectGeometryBuffer geometryBuffer)
Parameters:
geometryBuffer - the geometryBuffer to set

read

public RenderablePrototype read(ByteBuffer buffer)
Description copied from class: ObjectSerializer
Create a PositionableModel by reading it from the buffer.

Specified by:
read in class ObjectSerializer<RenderablePrototype>
Returns:
the instantiated PositionableModel

serializedObjectSize

public int serializedObjectSize(DataObjectInfo<RenderablePrototype> object)
Description copied from class: ObjectSerializer
Returns the size of the object after serialization, without the header information, just the fields.

Specified by:
serializedObjectSize in class ObjectSerializer<RenderablePrototype>
Parameters:
object - to get the size from
Returns:
the size of the object after serialization, without the header information.

write

public void write(ByteBuffer buffer,
                  DataObjectInfo<RenderablePrototype> object)
Description copied from class: ObjectSerializer
Write the given PositionableModel to the buffer.

Specified by:
write in class ObjectSerializer<RenderablePrototype>

serializeObject

public byte[] serializeObject(DataObjectInfo<RenderablePrototype> object)
Description copied from class: ObjectSerializer
Serializes an object using the standard serialization mechanism, ObjectOutputStream

Overrides:
serializeObject in class ObjectSerializer<RenderablePrototype>
Parameters:
object - to be serialized with the ObjectOutputStream
Returns:
the byte array containing the serialized object.

deserializeDataObject

public RenderablePrototype deserializeDataObject(byte[] buffer)
Description copied from class: ObjectSerializer
Deserialize an object from the given byte array.

Overrides:
deserializeDataObject in class ObjectSerializer<RenderablePrototype>
Parameters:
buffer - containing bytes to deserialize.
Returns:
the deserialized object of type T.


Copyright © 2011. All Rights Reserved.