|
Project JXTA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
JXTA documents are simple containers for data. JXTA makes no interpretation of the data contained in a Document. Each Document is typed using a MIME Media Type (as defined by IETF RFC 2046 MIME : Media Types).
Note : Document is intended to be somewhat analagous to HTTP streams we don't provide for compression, encoding, etc. though and leave it all up to the MIME media type and whatever parameters it may specify. Its not clear if we should break this stuff up and include such attributes or leave it as is.
Document,
MimeMediaType,
StructuredDocument,
StructuredTextDocument| Method Summary | |
java.lang.String |
getFileExtension()
Returns the file extension type used by this Document. |
MimeMediaType |
getMimeType()
Returns the MIME Media type of this Document per IETF RFC 2046 MIME : Media Types Jxta does not currently support the 'Multipart' or 'Message' media types. |
java.io.InputStream |
getStream()
Returns a stream of bytes which represent the content of this Document. |
void |
sendToStream(java.io.OutputStream stream)
Rather than returning an InputStream like getStream(), send the
document to the specified stream. |
| Method Detail |
public MimeMediaType getMimeType()
public java.lang.String getFileExtension()
public java.io.InputStream getStream()
throws java.io.IOException
InputStream containing the bytes
of this Document.java.io.IOException - if an I/O error occurs.
public void sendToStream(java.io.OutputStream stream)
throws java.io.IOException
getStream(), send the
document to the specified stream.stream - The OutputStream to which the document will be written.java.io.IOException - if an I/O error occurs.
|
Project JXTA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||