public class FileBody extends AbstractContentBody
Description:
| 构造器和说明 |
|---|
FileBody(File file) |
FileBody(File file,
ContentType contentType) |
FileBody(File file,
ContentType contentType,
String filename) |
FileBody(File file,
String mimeType) |
FileBody(File file,
String mimeType,
String charset) |
FileBody(File file,
String filename,
String mimeType,
String charset) |
| 限定符和类型 | 方法和说明 |
|---|---|
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, getMimeTypepublic 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 String getTransferEncoding()
ContentBodypublic long getContentLength()
ContentBodypublic String getFilename()
public File getFile()
Copyright © 2019. All rights reserved.