net.jxta.document
Interface StructuredDocumentFactory.TextInstantiator
- All Superinterfaces:
- StructuredDocumentFactory.Instantiator
- Enclosing class:
- StructuredDocumentFactory
public static interface StructuredDocumentFactory.TextInstantiator
- extends StructuredDocumentFactory.Instantiator
Interface for instantiators of StructuredTextDocuments
newInstance
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 MIME type 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 MIME type.source
- Reader
from which to read the instance.
- Returns:
StructuredDocument
instance.
- Throws:
IOException
- Thrown for problems reading from the source.