public class FileBody extends AbstractContentBody
MultipartEntityBuilder| Constructor and Description |
|---|
FileBody(File file) |
FileBody(File file,
org.apache.hc.core5.http.ContentType contentType) |
FileBody(File file,
org.apache.hc.core5.http.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, getSubTypepublic FileBody(File file)
public FileBody(File file, org.apache.hc.core5.http.ContentType contentType, String filename)
public FileBody(File file, org.apache.hc.core5.http.ContentType contentType)
public InputStream getInputStream() throws IOException
IOExceptionpublic void writeTo(OutputStream out) throws IOException
IOExceptionpublic long getContentLength()
ContentDescriptorpublic String getFilename()
public File getFile()
Copyright © 1999–2022 The Apache Software Foundation. All rights reserved.