public static class Binary.BinaryStream extends java.lang.Object implements Binary
Binary.BinaryFile, Binary.BinaryStream, Binary.BinaryString
Constructor and Description |
---|
BinaryStream(java.io.InputStream is,
int size)
Creates a new binary stream wrapper.
|
Modifier and Type | Method and Description |
---|---|
long |
lastModified()
The last modified timestamp for the object, if known.
|
java.lang.String |
mimeType()
The MIME type of the binary data.
|
java.io.InputStream |
openStream()
Opens a new input stream for reading the data.
|
long |
size()
Returns the size (in bytes) of the binary object, if known.
|
public BinaryStream(java.io.InputStream is, int size)
is
- the input stream to encapsulatesize
- the size (in bytes), or -1 if unknownpublic long size()
public long lastModified()
lastModified
in interface Binary
public java.lang.String mimeType()
public java.io.InputStream openStream() throws java.io.IOException
openStream
in interface Binary
java.io.IOException
- if the data couldn't be opened for reading