net.infonode.docking
Interface ViewSerializer

All Known Implementing Classes:
AbstractViewMap, MixedViewHandler, StringViewMap, ViewMap

public interface ViewSerializer

Reads and writes the state of a view.

Version:
$Revision: 1.5 $
Author:
$Author: jesper $

Method Summary
 View readView(java.io.ObjectInputStream in)
          Reads and returns a view.
 void writeView(View view, java.io.ObjectOutputStream out)
          Writes a view to a stream.
 

Method Detail

writeView

void writeView(View view,
               java.io.ObjectOutputStream out)
               throws java.io.IOException
Writes a view to a stream. Note that the view property values are written automatically, so this method should not write them.

Parameters:
view - the view to write
out - the stream on which to write the view
Throws:
java.io.IOException - if there is a stream error

readView

View readView(java.io.ObjectInputStream in)
              throws java.io.IOException
Reads and returns a view. Must read all the data written in the writeView(net.infonode.docking.View, java.io.ObjectOutputStream) method. Note that the view property values are read automatically, so this method should not read them. This method should return null if the serialized view can't be resolved.

Parameters:
in - the stream from which to read the view state
Returns:
the view, null if the view can't be resolved
Throws:
java.io.IOException - if there is a stream error