| javax.jcr.Binary
Binary | public interface Binary (Code) | | The Binary interface and its related methods in
Property , Value and ValueFactory
replace the deprecated
Value.getStream and
Property.getStream methods. The Binary interface allows repositories to provide
implementations that handle JCR BINARY values in the most efficient manner,
given the specifics of their internal handling of the binary data.
since: JCR 2.0 |
Method Summary | |
void | acquire() Clients must call this method before using any of the other methods of
this interface, other than
Binary.release .
This method is used by the implementation to track the usage of
Binary objects and perform any preparation that may be
necessary for returning the binary data (through either
Binary.getStream or
Binary.getBytes ) or reporting the size of the binary data (through
Binary.getSize ). | byte[] | getBytes() Returns a byte array representation of this value. | long | getSize() Returns the size of this value in bytes. | InputStream | getStream() Returns an InputStream representation of this value. | void | release() Clients must call this method when they are finished with a
Binary object instance in order to allow the implementation
to release any resources used during the lifetime of the object. |
release | void release() throws RepositoryException(Code) | | Clients must call this method when they are finished with a
Binary object instance in order to allow the implementation
to release any resources used during the lifetime of the object. The
details of any such clean-up will be specific to the implementation.
It is legal for this method to be called even if
Binary.acquire has not
yet been called, though in a typical implementation this will have no
effect.
throws: RepositoryException - if an error occurs. |
|
|