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
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.