public class FileBody extends AbstractContentBody
MultipartEntityBuilder| Constructor and Description |
|---|
FileBody(java.io.File file) |
FileBody(java.io.File file,
ContentType contentType) |
FileBody(java.io.File file,
ContentType contentType,
java.lang.String filename) |
| Modifier and Type | Method and Description |
|---|---|
long |
getContentLength()
Returns the body descriptors content-length.
|
java.io.File |
getFile() |
java.lang.String |
getFilename() |
java.io.InputStream |
getInputStream() |
void |
writeTo(java.io.OutputStream out) |
getCharset, getContentType, getMediaType, getMimeType, getSubTypepublic FileBody(java.io.File file)
public FileBody(java.io.File file,
ContentType contentType,
java.lang.String filename)
public FileBody(java.io.File file,
ContentType contentType)
public java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOExceptionpublic void writeTo(java.io.OutputStream out)
throws java.io.IOException
java.io.IOExceptionpublic long getContentLength()
ContentDescriptorpublic java.lang.String getFilename()
public java.io.File getFile()