org.nodal.filesystem
Interface DocumentFormat.Decoder

Enclosing interface:
DocumentFormat

public static interface DocumentFormat.Decoder

The class that describes DocumentFormat decoders.


Method Summary
 Node decode(java.io.InputStream stream, NodeFactory factory)
          Decode the input stream to create a Node graph.
 java.util.List exceptions()
          Returns a list of exceptions that occurred in processing the previous decode().
 boolean isLossless()
          Does the decoding extract enough information to perfectly reconstruct the decoded stream.
 java.lang.String setURI(java.lang.String uri)
          Set the URI to be used as the context of the next decode.
 

Method Detail

isLossless

public boolean isLossless()
Does the decoding extract enough information to perfectly reconstruct the decoded stream.


decode

public Node decode(java.io.InputStream stream,
                   NodeFactory factory)
            throws java.io.IOException
Decode the input stream to create a Node graph.

Parameters:
stream - The stream to be decoded.
factory - The factory that will be used to create Nodes.
Returns:
the root Node of the decoded node graph or null if failed.
Throws:
java.io.IOException

setURI

public java.lang.String setURI(java.lang.String uri)
Set the URI to be used as the context of the next decode.

Parameters:
uri - the URI string that is used for document context
Returns:
the previous value of the URI

exceptions

public java.util.List exceptions()
Returns a list of exceptions that occurred in processing the previous decode(). Warnings should appear in this List even if the decode() succeeded, otherwise they are mixed with failure exceptions.

Returns:
List of exceptions that occurred in previous decode()