public final class BlobstoreInputStream
extends java.io.InputStream
Modifier and Type | Class and Description |
---|---|
static class |
BlobstoreInputStream.BlobstoreIOException
A subclass of
IOException that indicates that there was a problem
interacting with Blobstore. |
static class |
BlobstoreInputStream.ClosedStreamException
A subclass of
IOException that indicates operations on a stream after
it is closed. |
Constructor and Description |
---|
BlobstoreInputStream(BlobKey blobKey)
Creates a BlobstoreInputStream that reads data from the blob indicated by
blobKey, starting at the beginning of the blob.
|
BlobstoreInputStream(BlobKey blobKey,
long offset)
Creates a BlobstoreInputStream that reads data from the blob indicated by
blobKey, starting at offset.
|
public BlobstoreInputStream(BlobKey blobKey, long offset) throws java.io.IOException
blobKey
- A valid BlobKey indicating the blob to read from.offset
- An offset to start from.BlobstoreInputStream.BlobstoreIOException
- If the blobKey given is invalid.java.lang.IllegalArgumentException
- If offset
< 0.java.io.IOException
public BlobstoreInputStream(BlobKey blobKey) throws java.io.IOException
blobKey
- A valid BlobKey indicating the blob to read from.BlobstoreInputStream.BlobstoreIOException
- If the blobKey given is invalid.java.lang.IllegalArgumentException
- If offset
< 0.java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
- - does not actually throw but as it's part of our public API and
removing it can cause compilation errors, leaving it in (and documenting to quiet Eclipse
warning).public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.InputStream
public void mark(int readlimit)
mark
in class java.io.InputStream
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException