|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BlobStore
An interface to store and read large binary objects.
| Method Summary | |
|---|---|
String |
getBlobId(String reference)
Returns the blobId that referred by the given binary reference. |
long |
getBlobLength(String blobId)
Get the length of the blob. |
InputStream |
getInputStream(String blobId)
Returns a new stream for given blobId. |
String |
getReference(String blobId)
Returns a secure reference to blob referred by blobid, or null if no such
reference is available. |
int |
readBlob(String blobId,
long pos,
byte[] buff,
int off,
int length)
Read a number of bytes from a blob. |
String |
writeBlob(InputStream in)
Write a blob from an input stream. |
| Method Detail |
|---|
String writeBlob(InputStream in)
throws IOException
in - the input stream
IOException
int readBlob(String blobId,
long pos,
byte[] buff,
int off,
int length)
throws IOException
blobId - the blob idpos - the position within the blobbuff - the target byte arrayoff - the offset within the target arraylength - the number of bytes to read
IOException
long getBlobLength(String blobId)
throws IOException
blobId - the blob id
IOException
InputStream getInputStream(String blobId)
throws IOException
read
return the same sequence of bytes as long as neither call throws
an exception.
blobId - the blob id
IOException
@CheckForNull
String getBlobId(@Nonnull
String reference)
null if the reference is invalid, for example if it
points to a blob that does not exist.
reference - binary reference
null
@CheckForNull
String getReference(@Nonnull
String blobId)
null if no such
reference is available.
blobId - blobId referring the blob for which reference is required
null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||