org.simantics.databoard.serialization.impl
Class FloatArraySerializer

java.lang.Object
  extended by org.simantics.databoard.serialization.Serializer
      extended by org.simantics.databoard.serialization.Serializer.NonRecursiveSerializer
          extended by org.simantics.databoard.serialization.impl.FloatArraySerializer

public class FloatArraySerializer
extends Serializer.NonRecursiveSerializer


Nested Class Summary
 
Nested classes/interfaces inherited from class org.simantics.databoard.serialization.Serializer
Serializer.CompositeSerializer, Serializer.NonRecursiveSerializer, Serializer.RecursiveSerializer
 
Constructor Summary
FloatArraySerializer(ArrayBinding binding)
           
 
Method Summary
 java.lang.Object deserialize(java.io.DataInput in)
           
 void deserializeTo(java.io.DataInput in, java.lang.Object obj)
           
 java.lang.Object deserializeToTry(java.io.DataInput in, java.util.List<java.lang.Object> identities, java.lang.Object obj)
          Attempt deserialize to existing instance.
 java.lang.Integer getConstantSize()
          Get constant size of the data type in its binary serialized format
 int getMinSize()
           
 int getSize(java.lang.Object obj)
           
static int getSizeOfPutLength(int length)
          Get the number of bytes it takes to output length field of value length.
 void serialize(java.io.DataOutput out, java.lang.Object obj)
           
 void skip(java.io.DataInput in)
           
 
Methods inherited from class org.simantics.databoard.serialization.Serializer.NonRecursiveSerializer
deserialize, deserializeTo, getSize, serialize, skip
 
Methods inherited from class org.simantics.databoard.serialization.Serializer
deserialize, deserialize, deserialize, deserialize, deserialize, deserialize, getInputStream, serialize, serialize, serialize, serialize, skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloatArraySerializer

public FloatArraySerializer(ArrayBinding binding)
Method Detail

deserialize

public java.lang.Object deserialize(java.io.DataInput in)
                             throws java.io.IOException
Specified by:
deserialize in class Serializer
Throws:
java.io.IOException

deserializeToTry

public java.lang.Object deserializeToTry(java.io.DataInput in,
                                         java.util.List<java.lang.Object> identities,
                                         java.lang.Object obj)
                                  throws java.io.IOException
Description copied from class: Serializer
Attempt deserialize to existing instance. Creates new if not possible.

Overrides:
deserializeToTry in class Serializer
Returns:
dst or new obj
Throws:
java.io.IOException

deserializeTo

public void deserializeTo(java.io.DataInput in,
                          java.lang.Object obj)
                   throws java.io.IOException
Specified by:
deserializeTo in class Serializer
Throws:
java.io.IOException

skip

public void skip(java.io.DataInput in)
          throws java.io.IOException
Specified by:
skip in class Serializer
Throws:
java.io.IOException

serialize

public void serialize(java.io.DataOutput out,
                      java.lang.Object obj)
               throws java.io.IOException
Specified by:
serialize in class Serializer
Throws:
java.io.IOException

getConstantSize

public java.lang.Integer getConstantSize()
Description copied from class: Serializer
Get constant size of the data type in its binary serialized format

Specified by:
getConstantSize in class Serializer
Returns:
size in bytes or null if not fixed

getSize

public int getSize(java.lang.Object obj)
Specified by:
getSize in class Serializer

getSizeOfPutLength

public static int getSizeOfPutLength(int length)
Get the number of bytes it takes to output length field of value length.

Parameters:
length - length value
Returns:
bytes required

getMinSize

public int getMinSize()
Specified by:
getMinSize in class Serializer