|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.entity.mime.content.AbstractContentBody
org.apache.http.entity.mime.content.FileBody
public class FileBody
Constructor Summary | |
---|---|
FileBody(File file)
|
|
FileBody(File file,
String mimeType)
|
|
FileBody(File file,
String mimeType,
String charset)
|
|
FileBody(File file,
String filename,
String mimeType,
String charset)
|
Method Summary | |
---|---|
String |
getCharset()
The body descriptors character set, defaulted appropriately for the MIME type. |
long |
getContentLength()
Returns the body descriptors content-length. |
File |
getFile()
|
String |
getFilename()
|
InputStream |
getInputStream()
|
String |
getTransferEncoding()
Returns the body descriptors transfer encoding. |
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 |
---|
getMediaType, getMimeType, getSubType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileBody(File file, String filename, String mimeType, String charset)
public FileBody(File file, String mimeType, String charset)
public FileBody(File file, String mimeType)
public FileBody(File file)
Method Detail |
---|
public InputStream getInputStream() throws IOException
IOException
@Deprecated public void writeTo(OutputStream out, int mode) throws IOException
writeTo(OutputStream)
IOException
public void writeTo(OutputStream out) throws IOException
IOException
public String getTransferEncoding()
ContentDescriptor
public String getCharset()
ContentDescriptor
The body descriptors character set, defaulted appropriately for the MIME type.
For TEXT
types, this will be defaulted to us-ascii
.
For other types, when the charset parameter is missing this property will be null.
TEXT
types, when unset will
be set to default us-ascii
. For other types, when unset,
null will be returned.public long getContentLength()
ContentDescriptor
public String getFilename()
public File getFile()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |