org.apache.http.entity.mime.content
Class InputStreamBody

java.lang.Object
  extended by org.apache.james.mime4j.message.AbstractBody
      extended by org.apache.http.entity.mime.content.AbstractContentBody
          extended by org.apache.http.entity.mime.content.InputStreamBody
All Implemented Interfaces:
ContentBody, org.apache.james.mime4j.descriptor.ContentDescriptor, org.apache.james.mime4j.message.BinaryBody, org.apache.james.mime4j.message.Body, org.apache.james.mime4j.message.Disposable

public class InputStreamBody
extends AbstractContentBody
implements org.apache.james.mime4j.message.BinaryBody


Constructor Summary
InputStreamBody(java.io.InputStream in, java.lang.String filename)
           
InputStreamBody(java.io.InputStream in, java.lang.String mimeType, java.lang.String filename)
           
 
Method Summary
 java.lang.String getCharset()
           
 long getContentLength()
           
 java.lang.String getFilename()
           
 java.io.InputStream getInputStream()
           
 java.lang.String getTransferEncoding()
           
 void writeTo(java.io.OutputStream out, int mode)
           
 
Methods inherited from class org.apache.http.entity.mime.content.AbstractContentBody
getContentTypeParameters, getMediaType, getMimeType, getSubType
 
Methods inherited from class org.apache.james.mime4j.message.AbstractBody
dispose, getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.james.mime4j.message.Body
getParent, setParent
 
Methods inherited from interface org.apache.james.mime4j.message.Disposable
dispose
 

Constructor Detail

InputStreamBody

public InputStreamBody(java.io.InputStream in,
                       java.lang.String mimeType,
                       java.lang.String filename)

InputStreamBody

public InputStreamBody(java.io.InputStream in,
                       java.lang.String filename)
Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Specified by:
getInputStream in interface org.apache.james.mime4j.message.BinaryBody
Throws:
java.io.IOException

writeTo

public void writeTo(java.io.OutputStream out,
                    int mode)
             throws java.io.IOException
Specified by:
writeTo in interface org.apache.james.mime4j.message.Body
Throws:
java.io.IOException

getTransferEncoding

public java.lang.String getTransferEncoding()
Specified by:
getTransferEncoding in interface org.apache.james.mime4j.descriptor.ContentDescriptor

getCharset

public java.lang.String getCharset()
Specified by:
getCharset in interface org.apache.james.mime4j.descriptor.ContentDescriptor

getContentLength

public long getContentLength()
Specified by:
getContentLength in interface org.apache.james.mime4j.descriptor.ContentDescriptor

getFilename

public java.lang.String getFilename()
Specified by:
getFilename in interface ContentBody


Copyright © 1999-2008 Apache Software Foundation. All Rights Reserved.