public interface Blob
Not that blobs are not thread safe. While they support requesting multiple concurrent input streams, these streams must be used in the same thread, unless appropriate synchronization or locking is done.
Modifier and Type | Method and Description |
---|---|
InputStream |
getInputStream()
Get an input stream to read the data in the blob.
|
long |
getLength()
Get the length of the data in the blob, i.e. the number of bytes.
|
void |
writeTo(OutputStream out)
Write the data to a given output stream.
|
InputStream getInputStream() throws IOException
IOException
void writeTo(OutputStream out) throws StreamCopyException
out
- The output stream to write the data to. This method will not close the stream.StreamCopyException
- Thrown if there is an I/O when reading the data from the blob or when writing it
to the stream. StreamCopyException.getOperation()
can be used to
determine whether the failed operation was a read or a write.long getLength()
Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.