public class InputStreamBody extends AbstractContentBody
Constructor and Description |
---|
InputStreamBody(InputStream in,
String filename) |
InputStreamBody(InputStream in,
String mimeType,
String filename) |
Modifier and Type | Method and Description |
---|---|
String |
getCharset()
The body descriptors character set, defaulted appropriately for the MIME type.
|
long |
getContentLength()
Returns the body descriptors content-length.
|
String |
getFilename() |
InputStream |
getInputStream() |
String |
getTransferEncoding()
Returns the body descriptors transfer encoding.
|
void |
writeTo(OutputStream out) |
getMediaType, getMimeType, getSubType
public InputStreamBody(InputStream in, String mimeType, String filename)
public InputStreamBody(InputStream in, String filename)
public InputStream getInputStream()
public void writeTo(OutputStream out) throws IOException
IOException
public String getTransferEncoding()
ContentDescriptor
public String getCharset()
ContentDescriptor
The body descriptors character set, defaulted appropriately for the MIME type.
For TEXT
types, this will be defaulted to us-ascii
.
For other types, when the charset parameter is missing this property will be null.
TEXT
types, when unset will
be set to default us-ascii
. For other types, when unset,
null will be returned.public long getContentLength()
ContentDescriptor
public String getFilename()
Copyright © 1999–2014 The Apache Software Foundation. All rights reserved.