public class FileBody extends AbstractContentBody
MultipartEntityBuilder| Constructor and Description |
|---|
FileBody(File file) |
FileBody(File file,
org.apache.http.entity.ContentType contentType) |
FileBody(File file,
org.apache.http.entity.ContentType contentType,
String filename) |
FileBody(File file,
String mimeType)
Deprecated.
(4.3) use
FileBody(File, ContentType)
or MultipartEntityBuilder |
FileBody(File file,
String mimeType,
String charset)
Deprecated.
(4.3) use
FileBody(File, ContentType)
or MultipartEntityBuilder |
FileBody(File file,
String filename,
String mimeType,
String charset)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
getCharset, getContentType, getMediaType, getMimeType, getSubType@Deprecated public FileBody(File file, String filename, String mimeType, String charset)
@Deprecated public FileBody(File file, String mimeType, String charset)
@Deprecated public FileBody(File file, String mimeType)
public FileBody(File file)
public FileBody(File file, org.apache.http.entity.ContentType contentType, String filename)
public FileBody(File file, org.apache.http.entity.ContentType contentType)
public InputStream getInputStream() throws IOException
IOExceptionpublic void writeTo(OutputStream out) throws IOException
IOExceptionpublic String getTransferEncoding()
ContentDescriptorpublic long getContentLength()
ContentDescriptorpublic String getFilename()
public File getFile()
Copyright © 1999–2022 The Apache Software Foundation. All rights reserved.