bibliothek.gui.dock.layout
Interface MissingDockFactory


public interface MissingDockFactory

A MissingDockFactory is used by a DockSituation to read the contents of a file if the factory that was supposed to read that content is missing.

Author:
Benjamin Sigg

Method Summary
 Object read(String id, DataInputStream in, int length)
          Reads up to length bytes from in and returns some object that represents the content of in.
 Object readXML(String id, XElement element)
          Reads element and returns an object that represents the content of element.
 

Method Detail

read

Object read(String id,
            DataInputStream in,
            int length)
            throws IOException
Reads up to length bytes from in and returns some object that represents the content of in. Note that if later a factory for id is registered, then that object will be cast to the factories preferred way to look at it. A result of null indicates that this factory does not know how to handle the situation.

Parameters:
id - the id of the factory which was supposed to read the stream
in - the stream to read
length - the maximal number of bytes this factory can read before the end of the stream is reached
Returns:
the content of in or null
Throws:
IOException - forwarded from in

readXML

Object readXML(String id,
               XElement element)
Reads element and returns an object that represents the content of element. Note that if later a factory for id is registered, then that object will be cast to the factories preferred way to look at it.

Parameters:
id - the id of the factory which was supposed to read element
element - the contents
Returns:
a representation of element or null