public class BinaryImpl
extends java.lang.Object
implements javax.jcr.Binary
BinaryImpl implements the Binary interface.| Constructor and Description |
|---|
BinaryImpl(byte[] buffer)
Creates a new
BinaryImpl instance from a
byte[] array. |
BinaryImpl(java.io.InputStream in)
Creates a new
BinaryImpl instance from an
InputStream. |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
long |
getSize() |
java.io.InputStream |
getStream() |
int |
read(byte[] b,
long position) |
public BinaryImpl(java.io.InputStream in)
throws java.io.IOException
BinaryImpl instance from an
InputStream. The contents of the stream is spooled
to a temporary file or to a byte buffer if its size is smaller than
MAX_BUFFER_SIZE.
in - stream to be represented as a BLOBFileValue instancejava.io.IOException - if an error occurs while reading from the stream or
writing to the temporary filepublic BinaryImpl(byte[] buffer)
BinaryImpl instance from a
byte[] array.buffer - byte array to be represented as a BinaryImpl
instancepublic java.io.InputStream getStream()
throws javax.jcr.RepositoryException
getStream in interface javax.jcr.Binaryjavax.jcr.RepositoryExceptionpublic int read(byte[] b,
long position)
throws java.io.IOException,
javax.jcr.RepositoryException
read in interface javax.jcr.Binaryjava.io.IOExceptionjavax.jcr.RepositoryExceptionpublic long getSize()
throws javax.jcr.RepositoryException
getSize in interface javax.jcr.Binaryjavax.jcr.RepositoryExceptionpublic void dispose()
dispose in interface javax.jcr.BinaryCopyright © 2010 - 2025 Adobe. All Rights Reserved