|
Clearspace API (2.0.15) Web Services Client Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.community.webservices.WSJiveObject
com.jivesoftware.community.webservices.WSBinaryBody
public class WSBinaryBody
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 com.jivesoftware.community.StorageManager; the
default implementation puts binary body objects in the database.
| Field Summary |
|---|
| Fields inherited from class com.jivesoftware.community.webservices.WSJiveObject |
|---|
id, objectType |
| Constructor Summary | |
|---|---|
WSBinaryBody()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getContentType()
Returns the content type of the body object. |
byte[] |
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. |
java.lang.String |
getName()
Returns the name of the body object. |
long |
getSize()
Returns the size of the body object in bytes. |
void |
setContentType(java.lang.String contentType)
|
void |
setData(byte[] data)
|
void |
setDownloadCount(int downloadCount)
|
void |
setName(java.lang.String name)
Sets the name of the body object. |
void |
setSize(long size)
|
| Methods inherited from class com.jivesoftware.community.webservices.WSJiveObject |
|---|
equals, getID, getObjectType, hashCode, setID, setObjectType, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public WSBinaryBody()
| Method Detail |
|---|
public java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
public java.lang.String getName()
public void setName(java.lang.String name)
name - the new name of the body object.
UnauthorizedException - if not allowed to modify the body objectpublic long getSize()
public void setSize(long size)
public byte[] getData()
throws java.io.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.
java.io.IOException - if an error occurs reading the body object from storage.public void setData(byte[] data)
public int getDownloadCount()
public void setDownloadCount(int downloadCount)
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||