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