public interface BinaryContent
BinaryContent is used to return a format that has been transformed by a Transformer.InputTransformer,
QueryResponseTransformer| Modifier and Type | Method and Description |
|---|---|
byte[] |
getByteArray()
Convenience method to attempt to read the contents of the
InputStream into a
byte array. |
InputStream |
getInputStream()
Gets the input stream.
|
MimeType |
getMimeType() |
String |
getMimeTypeValue()
|
long |
getSize()
Get the size if known.
|
InputStream getInputStream()
Note that the binary from the InputStream can only be accessed once. Thus, when
you call getInputStream() and retrieve the InputStream object, it can
only be used once to extract the content. If it is necessary that the bytes of the
InputStream object are needed again, use the getByteArray() method instead.
MimeType getMimeType()
InputStreamlong getSize()
long, -1 if unknownbyte[] getByteArray()
throws IOException
InputStream into a
byte array.
Note that getByteArray() should be idempotent if getInputStream() has not
been initially invoked.
IOException - if the stream can not be read into the arrayThis work is licensed under a Creative Commons Attribution 4.0 International License.