|
Clearspace API (2.5.29) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BinaryBody
An object that encapsulates a binary document body. Each binary body object has a unique ID and is made up of three parts: binary data (read and written using an InputStream), a name, and content type. A binary body might have a name "technote.pfg" and corresponding content type of "application/pdf". A full listing of possible content types can be found at: ftp://ftp.iana.org/in-notes/iana/assignments/media-types/
The storage mechanism of binary body objects is controlled via the StorageManager; the
default implementation puts binary body objects in the database.
| Method Summary | |
|---|---|
String |
getContentType()
Returns the content type of the body object. |
InputStream |
getData()
Returns a InputStream for the binary contents of the body object. |
int |
getDownloadCount()
Returns the number of times the binary body has been downloaded. |
String |
getName()
Returns the name of the body object. |
long |
getSize()
Returns the size of the body object in bytes. |
void |
setName(String name)
Sets the name of the body object. |
| Methods inherited from interface com.jivesoftware.community.JiveObject |
|---|
getID, getObjectType |
| Method Detail |
|---|
String getContentType()
String getName()
void setName(String name)
throws UnauthorizedException
name - the new name of the body object.
UnauthorizedException - if not allowed to modify the body objectlong getSize()
InputStream getData()
throws IOException
InputStream for the binary contents of the body object. The stream
should be closed after reading the body object is completed. The InputStream will already be
buffered, so there is no advantage to using additional buffering.
IOException - if an error occurs reading the body object from storage.int getDownloadCount()
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||