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

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

@NotThreadSafe
public class FileBody
extends AbstractContentBody

Since:
4.0

Constructor Summary
FileBody(File file)
           
FileBody(File file, String mimeType)
           
 
Method Summary
 String getCharset()
           
 long getContentLength()
           
 File getFile()
           
 String getFilename()
           
 InputStream getInputStream()
           
 String getTransferEncoding()
           
 void writeTo(OutputStream out)
           
 void writeTo(OutputStream out, int mode)
          Deprecated. use writeTo(OutputStream)
 
Methods inherited from class org.apache.http.entity.mime.content.AbstractContentBody
dispose, getContentTypeParameters, getMediaType, getMimeType, getParent, getSubType, setParent
 
Methods inherited from class org.apache.james.mime4j.message.SingleBody
copy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileBody

public FileBody(File file,
                String mimeType)

FileBody

public FileBody(File file)
Method Detail

getInputStream

public InputStream getInputStream()
                           throws IOException
Throws:
IOException

writeTo

@Deprecated
public void writeTo(OutputStream out,
                               int mode)
             throws IOException
Deprecated. use writeTo(OutputStream)

Throws:
IOException

writeTo

public void writeTo(OutputStream out)
             throws IOException
Specified by:
writeTo in class SingleBody
Throws:
IOException

getTransferEncoding

public String getTransferEncoding()

getCharset

public String getCharset()

getContentLength

public long getContentLength()

getFilename

public String getFilename()

getFile

public File getFile()


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