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.IOExceptionpublic 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.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.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.InputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.InputStreampublic void mark(int readlimit)
mark in class java.io.InputStreampublic void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOException