|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.value.BaseValue
org.apache.jackrabbit.value.BinaryValue
public class BinaryValue
A BinaryValue provides an implementation
of the Value interface representing a binary value.
| Field Summary | |
|---|---|
static int |
TYPE
|
| Fields inherited from class org.apache.jackrabbit.value.BaseValue |
|---|
DEFAULT_ENCODING, stream, type |
| Constructor Summary | |
|---|---|
BinaryValue(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. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one. |
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. |
| Methods inherited from class org.apache.jackrabbit.value.BaseValue |
|---|
getBoolean, getDate, getDecimal, getDouble, getLong, getString, getType |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE
| Constructor Detail |
|---|
public BinaryValue(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(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 represent| Method Detail |
|---|
public 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.
equals in class Objectobj - 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 ObjectObject.hashCode()
public String getInternalString()
throws ValueFormatException,
RepositoryException
getInternalString in class BaseValueValueFormatException
RepositoryException - if another error occurs
public InputStream getStream()
throws IllegalStateException,
RepositoryException
getStream in interface ValuegetStream in class BaseValueIllegalStateException
RepositoryException
public Binary getBinary()
throws ValueFormatException,
IllegalStateException,
RepositoryException
getBinary in interface ValuegetBinary in class BaseValueValueFormatException
IllegalStateException
RepositoryException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||