org.apache.xpath.objects
Class XStringForChars
- Cloneable, Serializable, ExpressionNode, SourceLocator, XMLString, XPathVisitable
public class XStringForChars
This class will wrap a FastStringBuffer and allow for
XStringForChars(char[] val, int start, int length) - Construct a XNodeSet object.
|
void | appendToFsb(FastStringBuffer fsb) - Cast result object to a string.
|
char | charAt(int index) - Returns the character at the specified index.
|
void | dispatchAsComment(org.xml.sax.ext.LexicalHandler lh) - Directly call the
comment method on the passed LexicalHandler for the
string-value.
|
void | dispatchCharactersEvents(org.xml.sax.ContentHandler ch) - Directly call the
characters method on the passed ContentHandler for the
string-value.
|
FastStringBuffer | fsb() - Cast result object to a string.
|
void | getChars(int srcBegin, int srcEnd, dst[] , int dstBegin) - Copies characters from this string into the destination character
array.
|
boolean | hasString() - Tell if this object contains a java String object.
|
int | length() - Returns the length of this string.
|
Object | object() - Since this object is incomplete without the length and the offset, we
have to convert to a string when this function is called.
|
String | str() - Cast result object to a string.
|
bool , callVisitors , charAt , compareTo , compareToIgnoreCase , concat , dispatchAsComment , dispatchCharactersEvents , endsWith , equals , equals , equals , equals , equalsIgnoreCase , fixWhiteSpace , getChars , getType , getTypeString , hasString , hashCode , indexOf , indexOf , indexOf , indexOf , indexOf , lastIndexOf , lastIndexOf , lastIndexOf , lastIndexOf , length , num , rtf , startsWith , startsWith , startsWith , startsWith , str , substring , substring , toDouble , toLowerCase , toLowerCase , toUpperCase , toUpperCase , trim , xstr |
allowDetachToRelease , appendToFsb , bool , boolWithSideEffects , callVisitors , castToType , create , create , deepEquals , destruct , detach , dispatchCharactersEvents , equals , execute , fixupVariables , getFresh , getType , getTypeString , greaterThan , greaterThanOrEqual , iter , lessThan , lessThanOrEqual , mutableNodeset , nodelist , nodeset , notEquals , num , numWithSideEffects , object , reset , rtf , rtf , rtree , rtree , str , toString , xstr |
asIterator , asIteratorRaw , asNode , assertion , bool , canTraverseOutsideSubtree , deepEquals , error , execute , execute , execute , execute , executeCharsToContentHandler , exprAddChild , exprGetChild , exprGetNumChildren , exprGetParent , exprSetParent , fixupVariables , getColumnNumber , getExpressionOwner , getLineNumber , getPublicId , getSystemId , isNodesetExpr , isStableNumber , num , warn , xstr |
XStringForChars
public XStringForChars(char[] val,
int start,
int length)
Construct a XNodeSet object.
val
- FastStringBuffer object this will wrap, must be non-null.start
- The start position in the array.length
- The number of characters to read from the array.
charAt
public char charAt(int index)
Returns the character at the specified index. An index ranges
from 0
to length() - 1
. The first character
of the sequence is at index 0
, the next at index
1
, and so on, as for array indexing.
- charAt in interface XMLString
- charAt in interface XString
index
- the index of the character.
- the character at the specified index of this string.
The first character is at index
0
.
dispatchAsComment
public void dispatchAsComment(org.xml.sax.ext.LexicalHandler lh)
throws org.xml.sax.SAXException
Directly call the
comment method on the passed LexicalHandler for the
string-value.
- dispatchAsComment in interface XMLString
- dispatchAsComment in interface XString
lh
- A non-null reference to a LexicalHandler.
dispatchCharactersEvents
public void dispatchCharactersEvents(org.xml.sax.ContentHandler ch)
throws org.xml.sax.SAXException
Directly call the
characters method on the passed ContentHandler for the
string-value. Multiple calls to the
ContentHandler's characters methods may well occur for a single call to
this method.
- dispatchCharactersEvents in interface XMLString
- dispatchCharactersEvents in interface XString
ch
- A non-null reference to a ContentHandler.
fsb
public FastStringBuffer fsb()
Cast result object to a string.
- The string this wraps or the empty string if null
getChars
public void getChars(int srcBegin,
int srcEnd,
dst[] ,
int dstBegin)
Copies characters from this string into the destination character
array.
- getChars in interface XMLString
- getChars in interface XString
srcBegin
- index of the first character in the string
to copy.srcEnd
- index after the last character in the string
to copy.dstBegin
- the start offset in the destination array.
hasString
public boolean hasString()
Tell if this object contains a java String object.
- hasString in interface XMLString
- hasString in interface XString
- true if this XMLString can return a string without creating one.
length
public int length()
Returns the length of this string.
- length in interface XMLString
- length in interface XString
- the length of the sequence of characters represented by this
object.
object
public Object object()
Since this object is incomplete without the length and the offset, we
have to convert to a string when this function is called.
- object in interface XObject
- The java String representation of this object.
str
public String str()
Cast result object to a string.
- str in interface XString
- The string this wraps or the empty string if null
Copyright B) 2006 Apache XML Project. All Rights Reserved.