public class FileBody extends AbstractContentBody
MultipartEntityBuilder| 构造器和说明 |
|---|
FileBody(File file) |
FileBody(File file,
ContentType contentType) |
FileBody(File file,
ContentType contentType,
String filename) |
| 限定符和类型 | 方法和说明 |
|---|---|
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, ContentType contentType, String filename)
public FileBody(File file, ContentType contentType)
public InputStream getInputStream() throws IOException
IOExceptionpublic void writeTo(OutputStream out) throws IOException
IOExceptionpublic long getContentLength()
ContentDescriptorpublic String getFilename()
public File getFile()
Copyright © 2023. All rights reserved.