public class BinaryValue extends BaseValue
BinaryValue
provides an implementation
of the Value
interface representing a binary value.Modifier and Type | Field and Description |
---|---|
static int |
TYPE |
DEFAULT_ENCODING, stream, type
Constructor and Description |
---|
BinaryValue(javax.jcr.Binary bin)
Constructs a
BinaryValue object based on a Binary . |
BinaryValue(byte[] data)
Constructs a
BinaryValue object based on a byte array. |
BinaryValue(InputStream stream)
Constructs a
BinaryValue object based on a stream. |
BinaryValue(String text)
Constructs a
BinaryValue object based on a string. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
javax.jcr.Binary |
getBinary() |
String |
getInternalString()
Gets the string representation of this binary value.
|
InputStream |
getStream() |
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(String text)
BinaryValue
object based on a string.text
- the string this BinaryValue
should representpublic BinaryValue(javax.jcr.Binary bin)
BinaryValue
object based on a Binary
.bin
- the bytes this BinaryValue
should representpublic BinaryValue(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(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.
public int hashCode()
hashCode
in class Object
Object.hashCode()
public String getInternalString() throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
getInternalString
in class BaseValue
javax.jcr.ValueFormatException
javax.jcr.RepositoryException
- if another error occurspublic InputStream getStream() throws IllegalStateException, javax.jcr.RepositoryException
getStream
in interface javax.jcr.Value
getStream
in class BaseValue
IllegalStateException
javax.jcr.RepositoryException
public javax.jcr.Binary getBinary() throws javax.jcr.ValueFormatException, IllegalStateException, javax.jcr.RepositoryException
getBinary
in interface javax.jcr.Value
getBinary
in class BaseValue
javax.jcr.ValueFormatException
IllegalStateException
javax.jcr.RepositoryException
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.