Modifier and Type | Field and Description |
---|---|
static int |
TYPE |
Constructor and Description |
---|
BinaryValue(Binary bin)
Constructs a
BinaryValue object based on a Binary . |
BinaryValue(byte[] data)
Constructs a
BinaryValue object based on a byte array. |
BinaryValue(java.io.InputStream stream)
Constructs a
BinaryValue object based on a stream. |
BinaryValue(java.lang.String text)
Constructs a
BinaryValue object based on a string. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
Binary |
getBinary()
Returns a
Binary representation of this value. |
java.lang.String |
getInternalString()
Gets the string representation of this binary value.
|
java.io.InputStream |
getStream()
Returns an
InputStream representation of this value. |
int |
hashCode()
Returns zero to satisfy the Object equals/hashCode contract.
|
getBoolean, getDate, getDecimal, getDouble, getLong, getString, getType
public static final int TYPE
public BinaryValue(java.lang.String text)
BinaryValue
object based on a string.text
- the string this BinaryValue
should representpublic BinaryValue(Binary bin)
BinaryValue
object based on a Binary
.bin
- the bytes this BinaryValue
should representpublic BinaryValue(java.io.InputStream stream)
BinaryValue
object based on a stream.stream
- the stream this BinaryValue
should representpublic BinaryValue(byte[] data)
BinaryValue
object based on a byte array.data
- the bytes this BinaryValue
should representpublic boolean equals(java.lang.Object obj)
The result is true
if and only if the argument is not
null
and is a BinaryValue
object that
represents the same value as this object.
equals
in class java.lang.Object
obj
- the reference object with which to compare.true
if this object is the same as the obj
argument; false
otherwise.public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public java.lang.String getInternalString() throws ValueFormatException, RepositoryException
ValueFormatException
RepositoryException
- if another error occurspublic java.io.InputStream getStream() throws java.lang.IllegalStateException, RepositoryException
InputStream
representation of this value. Uses
the standard conversion to binary (see JCR specification).
It is the responsibility of the caller to close the returned
InputStream
.
getStream
in interface Value
getStream
in class BaseValue
InputStream
representation of this value.RepositoryException
- if an error occurs.java.lang.IllegalStateException
public Binary getBinary() throws ValueFormatException, java.lang.IllegalStateException, RepositoryException
Binary
representation of this value. The Binary
object in turn provides methods to access the binary data itself.
Uses the standard conversion to binary (see JCR specification).getBinary
in interface Value
getBinary
in class BaseValue
Binary
representation of this value.RepositoryException
- if an error occurs.ValueFormatException
java.lang.IllegalStateException
Copyright © 2010 - 2019 Adobe. All Rights Reserved