net.sf.jsefa
Interface Serializer

All Known Subinterfaces:
CsvSerializer, FlrSerializer, RbfSerializer, XmlSerializer
All Known Implementing Classes:
CsvSerializerImpl, FlrSerializerImpl, RbfSerializerImpl, XmlSerializerImpl

public interface Serializer

Iterator-style interface for stream based serializers.

Author:
Norman Lahme-Huetig

Method Summary
 void close(boolean closeWriter)
          Closes the serialization stream.
 void flush()
          Flushes the stream.
 LowLevelSerializer getLowLevelSerializer()
          Returns the underlying low level serializer.
 void open(Writer writer)
          Opens a new serialization stream based on the given writer.
 void write(Object obj)
          Writes the given object.
 

Method Detail

open

void open(Writer writer)
Opens a new serialization stream based on the given writer.

Parameters:
writer - the writer to base the stream on
Throws:
SerializationException

write

void write(Object obj)
Writes the given object.

Parameters:
obj - the object to write
Throws:
SerializationException

flush

void flush()
Flushes the stream.


close

void close(boolean closeWriter)
Closes the serialization stream. The underlying writer will be closed only if closeWriter is true, too.

Parameters:
closeWriter - if true, the underlying writer will be closed, too.
Throws:
SerializationException

getLowLevelSerializer

LowLevelSerializer getLowLevelSerializer()
Returns the underlying low level serializer.

Returns:
a low level serializer.


Copyright © 2014. All rights reserved.