|
Xindice API version 1.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xindice.core.data.Value
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.
Field Summary | |
protected byte[] |
data
|
protected int |
len
|
protected int |
pos
|
Constructor Summary | |
Value(byte[] data)
|
|
Value(byte[] data,
int pos,
int len)
|
|
Value(String data)
|
|
Value(Value value)
|
Method Summary | |
byte |
byteAt(int index)
Returns the byte at the specified index. |
int |
compareTo(Object obj)
|
int |
compareTo(Value value)
|
void |
copyTo(byte[] tdata,
int tpos)
Copy contents of the value into supplied byte array. |
void |
copyTo(byte[] tdata,
int tpos,
int len)
Copy len bytes of value's content into supplied
byte array. |
boolean |
equals(Object obj)
|
boolean |
equals(Value value)
|
byte[] |
getData()
getData retrieves the data being stored by the Value as a byte array. |
InputStream |
getInputStream()
Return an InputStream for the value. |
int |
getLength()
getLength retrieves the length of the data being stored by the Value. |
Value |
getSubvalue(int start,
int len)
Get a new Value that is part of this Value object. |
int |
hashCode()
|
boolean |
startsWith(Value value)
|
void |
streamTo(OutputStream out)
Stream the content of the value into an OutputStream. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected byte[] data
protected int pos
protected int len
Constructor Detail |
public Value(Value value)
public Value(byte[] data)
public Value(byte[] data, int pos, int len)
public Value(String data)
Method Detail |
public final int getLength()
public final byte[] getData()
public final Value getSubvalue(int start, int len)
start
- beginning indexlen
- length of the new ValueArrayIndexOutOfBoundsException
- if start index is either negative
or isn't less then length of original Valuepublic final byte byteAt(int index)
index
- byte indexArrayIndexOutOfBoundsException
- if index is negative number or
is not less that the length of Value datapublic final boolean startsWith(Value value)
public final InputStream getInputStream()
public final void streamTo(OutputStream out) throws IOException
out
- the OutputStreampublic final void copyTo(byte[] tdata, int tpos)
tdata
- byte array for the valuetpos
- starting positionpublic final void copyTo(byte[] tdata, int tpos, int len)
len
bytes of value's content into supplied
byte array.tdata
- byte array for the valuetpos
- starting positionlen
- count of bytes to copypublic final int compareTo(Value value)
public final int compareTo(Object obj)
compareTo
in interface Comparable
public boolean equals(Value value)
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public final String toString()
toString
in class Object
|
Xindice API version 1.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |