org.apache.xindice.core.data
Class Value
java.lang.Object
|
+--org.apache.xindice.core.data.Value
- All Implemented Interfaces:
- java.lang.Comparable
- Direct Known Subclasses:
- Key
- public class Value
- extends java.lang.Object
- implements java.lang.Comparable
Value is the primary base class for all data storing objects.
The content window of Value objects are immutable, but the
underlying byte array is not.
Method Summary |
int |
compareTo(java.lang.Object obj)
|
int |
compareTo(Value value)
|
void |
copyTo(byte[] tdata,
int tpos)
|
boolean |
equals(java.lang.Object obj)
|
boolean |
equals(Value value)
|
byte[] |
getData()
getData retrieves the data being stored by the Value as a byte array. |
java.io.InputStream |
getInputStream()
getInputStream returns an InputStream for the Value. |
int |
getLength()
getLength retrieves the length of the data being stored by the Value. |
int |
hashCode()
|
boolean |
startsWith(Value value)
|
void |
streamTo(java.io.OutputStream out)
streamTo streams the content of the Value to an OutputStream. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Value
public Value(Value value)
Value
public Value(byte[] data)
Value
public Value(byte[] data,
int pos,
int len)
Value
public Value(java.lang.String data)
getData
public final byte[] getData()
- getData retrieves the data being stored by the Value as a byte array.
- Returns:
- The Data
getLength
public final int getLength()
- getLength retrieves the length of the data being stored by the Value.
- Returns:
- The Value length
getInputStream
public final java.io.InputStream getInputStream()
- getInputStream returns an InputStream for the Value.
- Returns:
- An InputStream
streamTo
public final void streamTo(java.io.OutputStream out)
throws java.io.IOException
- streamTo streams the content of the Value to an OutputStream.
- Parameters:
out
- the OutputStream
copyTo
public final void copyTo(byte[] tdata,
int tpos)
toString
public final java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(Value value)
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
compareTo
public final int compareTo(Value value)
compareTo
public final int compareTo(java.lang.Object obj)
- Specified by:
compareTo
in interface java.lang.Comparable
startsWith
public final boolean startsWith(Value value)
Copyright (c) 1999-2001 The Apache Software Foundation