|
© 2003 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.content.BinaryValue
This class represents binary content. It contains the binary data along with binary metadata.
A BinaryValue must always contain the contentType, name and size. If the bytes are not present (they are not contained on when retrieving a Property for performance reasons), they can be retrieved through NodeOps for Property bytes and ObjectClassOps for PropertyChoice bytes. A size of -1, means it is not available.
After using a BinaryValue, it is necessary to close the value InputStream.
Constructor Summary | |
BinaryValue()
Constructs an empty BinaryValue. |
|
BinaryValue(String contentType,
String name,
int size)
Constructs a BinaryValue without the bytes. |
|
BinaryValue(String contentType,
String name,
int size,
InputStream value)
Constructs a full BinaryValue. |
Method Summary | |
String |
getContentType()
Gets the content type for the binary data. |
String |
getName()
Gets the filename for the binary data, including the file extension. |
int |
getSize()
Returns the size in bytes. |
InputStream |
getValue()
Gets the binary data. |
void |
setContentType(String contentType)
Sets the content type for the binary data. |
void |
setName(String name)
Sets the filename for the binary data, including the file extension. |
void |
setSize(int size)
Sets the size in bytes. |
void |
setValue(InputStream value)
Sets the binary data. |
String |
toString()
Returns the BinaryValue's name as a String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BinaryValue()
public BinaryValue(String contentType, String name, int size)
contentType
- - must have the mimeType and optionally
the charset in format "mimetypevalue;charset=charsetvalue".
For example, "text/html;charset=iso-8859-1"name
- - the filename including the extension. For example, foo.htmlsize
- - the size in bytes of the binary value.public BinaryValue(String contentType, String name, int size, InputStream value)
contentType
- - must have the mimeType and optionally
the charset in format "mimetypevalue;charset=charsetvalue".
For example, "text/html;charset=iso-8859-1"name
- - the filename including the extension. For example, foo.htmlsize
- - the size in bytes of the binary value.value
- - the the binary value as a an InputStream.Method Detail |
public String getContentType()
public void setContentType(String contentType)
public String getName()
public void setName(String name)
public InputStream getValue()
public void setValue(InputStream value)
public int getSize()
public void setSize(int size)
public String toString()
toString
in class Object
|
© 2003 BEA Systems, Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |