|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.endpoint.WireFormatMessageBinary.binaryMessageProxy
static class WireFormatMessageBinary.binaryMessageProxy
Internal representation for a binary format wire message. Implemented as an inner class to allow content encodings to be easily mapped on top of the streams this class produces.
Field Summary | |
---|---|
(package private) List<WireFormatMessageBinary.binaryElementProxy> |
elements
|
(package private) byte[] |
header
|
(package private) Message |
message
|
(package private) Map<String,Integer> |
namespaceIDs
|
(package private) List<String> |
namespaces
|
(package private) MimeMediaType |
type
|
Constructor Summary | |
---|---|
WireFormatMessageBinary.binaryMessageProxy(Message msg,
MimeMediaType type)
|
Method Summary | |
---|---|
ByteBuffer[] |
getByteBuffers()
Returns the Document as a sequence of ByteBuffers |
long |
getByteLength()
Returns the size of the serialized and encoded form of the message in bytes. |
MimeMediaType |
getContentEncoding()
Returns the encoding used for this content. |
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. |
InputStream |
getStream()
Returns the stream of bytes which represents the content of this Document . |
void |
sendToStream(OutputStream sendTo)
Send the contents of this Document to the specified stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final Message message
final MimeMediaType type
final List<WireFormatMessageBinary.binaryElementProxy> elements
final Map<String,Integer> namespaceIDs
final List<String> namespaces
byte[] header
Constructor Detail |
---|
WireFormatMessageBinary.binaryMessageProxy(Message msg, MimeMediaType type) throws IOException
IOException
Method Detail |
---|
public String getFileExtension()
Document
. This
value is usually chosen based upon the MIME Media Type.
getFileExtension
in interface Document
Document
.public MimeMediaType getMimeType()
Document
per
IETF RFC 2046 MIME : Media Types.
JXTA does not currently support the 'Multipart
' or
'Message
' media types.
getMimeType
in interface Document
Document
.public ByteBuffer[] getByteBuffers()
Document
as a sequence of ByteBuffers
getByteBuffers
in interface DocumentByteBufferIO
public InputStream getStream() throws IOException
Document
.
getStream
in interface DocumentStreamIO
InputStream
containing the bytes
of this Document
.
IOException
- For errors while writing the Document
.public void sendToStream(OutputStream sendTo) throws IOException
Document
to the specified stream.
sendToStream
in interface DocumentStreamIO
sendTo
- The OutputStream to which the Document
will
be written.
IOException
- For errors while writing the Document
.public long getByteLength()
getByteLength
in interface WireFormatMessage
public MimeMediaType getContentEncoding()
null
for
unencoded (raw) content.
getContentEncoding
in interface WireFormatMessage
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |