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

java.lang.Object
  extended by org.deegree.services.wpvs.io.serializer.ObjectSerializer<WorldRenderableObject>
      extended by org.deegree.services.wpvs.io.serializer.WROSerializer

public class WROSerializer
extends ObjectSerializer<WorldRenderableObject>

The WROSerializer class TODO add class documentation here.

Version:
$Revision: 22088 $, $Date: 2010-01-21 13:48:18 +0100 (Thu, 21 Jan 2010) $
Author:
Rutger Bezema, last edited by: $Author: rbezema $

Constructor Summary
WROSerializer()
           
 
Method Summary
 WorldRenderableObject deserializeDataObject(byte[] buffer)
          Deserialize an object from the given byte array.
 DirectGeometryBuffer getGeometryBuffer()
           
 WorldRenderableObject read(ByteBuffer buffer)
          Create a PositionableModel by reading it from the buffer.
 int serializedObjectSize(DataObjectInfo<WorldRenderableObject> object)
          Returns the size of the object after serialization, without the header information, just the fields.
 byte[] serializeObject(DataObjectInfo<WorldRenderableObject> doi)
          Serializes an object using the standard serialization mechanism, ObjectOutputStream
 void setGeometryBuffer(DirectGeometryBuffer geometryBuffer)
           
 void write(ByteBuffer buffer, DataObjectInfo<WorldRenderableObject> 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

WROSerializer

public WROSerializer()
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 WorldRenderableObject read(ByteBuffer buffer)
Description copied from class: ObjectSerializer
Create a PositionableModel by reading it from the buffer.

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

serializedObjectSize

public int serializedObjectSize(DataObjectInfo<WorldRenderableObject> 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<WorldRenderableObject>
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<WorldRenderableObject> object)
Description copied from class: ObjectSerializer
Write the given PositionableModel to the buffer.

Specified by:
write in class ObjectSerializer<WorldRenderableObject>

serializeObject

public byte[] serializeObject(DataObjectInfo<WorldRenderableObject> doi)
Serializes an object using the standard serialization mechanism, ObjectOutputStream

Overrides:
serializeObject in class ObjectSerializer<WorldRenderableObject>
Parameters:
doi - to be serialized with a DataOutputStream
Returns:
the byte array containing the serialized object.

deserializeDataObject

public WorldRenderableObject deserializeDataObject(byte[] buffer)
Deserialize an object from the given byte array.

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


Copyright © 2011. All Rights Reserved.