public class OffloadedBodyFactory
extends java.lang.Object
implements org.apache.james.mime4j.message.BodyFactory
| Modifier and Type | Class and Description | 
|---|---|
static interface  | 
OffloadedBodyFactory.SizedBody  | 
static class  | 
OffloadedBodyFactory.SizeStorage  | 
| Constructor and Description | 
|---|
OffloadedBodyFactory()  | 
| Modifier and Type | Method and Description | 
|---|---|
org.apache.james.mime4j.dom.BinaryBody | 
binaryBody(java.io.InputStream is)
Creates a  
BinaryBody that holds the content of the given input
 stream. | 
org.apache.james.mime4j.dom.TextBody | 
textBody(java.io.InputStream is,
        java.lang.String mimeCharset)
Creates a  
TextBody that holds the content of the given input
 stream. | 
public org.apache.james.mime4j.dom.BinaryBody binaryBody(java.io.InputStream is)
                                                  throws java.io.IOException
BinaryBody that holds the content of the given input
 stream.binaryBody in interface org.apache.james.mime4j.message.BodyFactoryis - input stream to create a message body from.java.io.IOException - if an I/O error occurs.public org.apache.james.mime4j.dom.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.
textBody in interface org.apache.james.mime4j.message.BodyFactoryis - input stream to create a message body from.mimeCharset - name of a MIME charset.java.io.IOException - if an I/O error occurs.Copyright © 2021. All Rights Reserved.