|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BodyFactory
Factory for creating message bodies.
Method Summary | |
---|---|
BinaryBody |
binaryBody(java.io.InputStream is)
Creates a BinaryBody that holds the content of the given input
stream. |
TextBody |
textBody(java.io.InputStream is,
java.lang.String mimeCharset)
Creates a TextBody that holds the content of the given input
stream. |
Method Detail |
---|
BinaryBody binaryBody(java.io.InputStream is) throws java.io.IOException
BinaryBody
that holds the content of the given input
stream.
is
- input stream to create a message body from.
java.io.IOException
- if an I/O error occurs.TextBody textBody(java.io.InputStream is, java.lang.String mimeCharset) throws java.io.IOException
TextBody
that holds the content of the given input
stream.
The charset corresponding to the given MIME charset name is used to
decode the byte content of the input stream into a character stream when
calling getReader()
on the returned object.
If the MIME charset has no corresponding Java charset or the Java charset
cannot be used for decoding then "us-ascii" is used instead.
is
- input stream to create a message body from.mimeCharset
- name of a MIME charset.
java.io.IOException
- if an I/O error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |