org.knime.core.data
Interface DataCellSerializer<T extends DataCell>

Type Parameters:
T - a DataValue implementation being read or written
All Superinterfaces:
SerializerMethodLoader.Serializer<T>
All Known Implementing Classes:
DateAndTimeCellSerializer

public interface DataCellSerializer<T extends DataCell>
extends SerializerMethodLoader.Serializer<T>

Interface for classes that can read or write specific DataCell implementations. Using DataCellSerializer implementations are normally considerably faster than ordinary Java serialization. Objects of this class are returned by a static method in a DataCell implementation. For further details see the DataCell description and the manual on how to define new types.

Author:
Bernd Wiswedel, University of Konstanz

Method Summary
 T deserialize(DataCellDataInput input)
          Loads a new instance of DataCell of type T from the input stream, which represents a former serialized DataCell content.
 void serialize(T cell, DataCellDataOutput output)
          Saves the cell to the output stream.
 

Method Detail

serialize

void serialize(T cell,
               DataCellDataOutput output)
               throws IOException
Saves the cell to the output stream.

Parameters:
cell - the DataCell to save
output - the place to write to
Throws:
IOException - if writing fails

deserialize

T deserialize(DataCellDataInput input)
                               throws IOException
Loads a new instance of DataCell of type T from the input stream, which represents a former serialized DataCell content.

Parameters:
input - the source to load from, never null
Returns:
a new DataValue instance of type T representing a former serialized DataCell
Throws:
IOException - if loading fails


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.