Project JXTA

net.jxta.document
Interface StructuredDocumentFactory.TextInstantiator

All Superinterfaces:
StructuredDocumentFactory.Instantiator
Enclosing interface:
StructuredDocumentFactory

public static interface StructuredDocumentFactory.TextInstantiator
extends StructuredDocumentFactory.Instantiator

Interface for instantiators of StructuredTextDocuments


Nested Class Summary
 
Nested classes inherited from class net.jxta.document.StructuredDocumentFactory.Instantiator
StructuredDocumentFactory.Instantiator.ExtensionMapping
 
Method Summary
 StructuredDocument newInstance(MimeMediaType mimeType, Reader source)
          Create a structured document from a Reader containing an appropriately serialized instance of the same document.
 
Methods inherited from interface net.jxta.document.StructuredDocumentFactory.Instantiator
getSupportedFileExtensions, getSupportedMimeTypes, newInstance, newInstance, newInstance
 

Method Detail

newInstance

public StructuredDocument newInstance(MimeMediaType mimeType,
                                      Reader source)
                               throws IOException
Create a structured document from a Reader containing an appropriately serialized instance of the same document.

Parameters:
mimeType - The mimetype to be associated with this instance. the base type must be one of the types returned by getSupportedMimeTypes. Some implementations may accept parameters in the params section of the mimetype.
source - Reader from which to read the instance.
Returns:
StructuredDocument instance.
Throws:
IOException - occurs when there is a problem with the source input stream.

JXTA J2SE