public interface Blob
Blobs are thread safe in the sense that methods defined by this interface may be called
concurrently. In addition, two different threads can safely invoke methods on two different
InputStream instances retrieved by
getInputStream() concurrently. However some
blobs (in particular
WritableBlob implementations) may define additional methods and
invoking these methods concurrently with methods defined by this interface is generally not
InputStream getInputStream() throws IOException
InputStreamobject is returned each time this method is called, and the stream is positioned at the beginning of the data.
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.
Copyright © The Apache Software Foundation. All Rights Reserved.