Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.apache.xpath.objects
Class XStringForChars

    java.lang.Object
      |
      +--weblogic.apache.xpath.Expression
            |
            +--weblogic.apache.xpath.objects.XObject
                  |
                  +--weblogic.apache.xpath.objects.XString
                        |
                        +--weblogic.apache.xpath.objects.XStringForChars

public class XStringForChars
extends XString

This class will wrap a FastStringBuffer and allow for

This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.

See Also:
  Serialized Form

Field Summary
`protected java.lang.String` | `m_strCache`

Fields inherited from class weblogic.apache.xpath.objects.XString
`EMPTYSTRING`

Fields inherited from class weblogic.apache.xpath.objects.XObject
`CLASS_BOOLEAN, CLASS_NODESET, CLASS_NULL, CLASS_NUMBER, CLASS_RTREEFRAG, CLASS_STRING, CLASS_UNKNOWN, CLASS_UNRESOLVEDVARIABLE, m_obj`

Fields inherited from class weblogic.apache.xpath.Expression
`m_slocator`

Constructor Summary
`XStringForChars(char[] val, int start, int length)` Construct a XNodeSet object.

Method Summary
`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, char[] 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.
`java.lang.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.
`java.lang.String` | `str()` Cast result object to a string.

Methods inherited from class weblogic.apache.xpath.objects.XString
`bool, compareTo, compareToIgnoreCase, concat, endsWith, equals, equals, equals, equalsIgnoreCase, fixWhiteSpace, getType, getTypeString, hashCode, indexOf, indexOf, indexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, num, rtf, startsWith, startsWith, startsWith, startsWith, substring, substring, toDouble, toLowerCase, toLowerCase, toUpperCase, toUpperCase, trim, xstr`

Methods inherited from class weblogic.apache.xpath.objects.XObject
`allowDetachToRelease, boolWithSideEffects, castToType, create, create, destruct, detach, error, error, execute, fixupVariables, greaterThan, greaterThanOrEqual, iter, lessThan, lessThanOrEqual, mutableNodeset, nodelist, nodeset, notEquals, numWithSideEffects, rtf, rtree, rtree, toString`

Methods inherited from class weblogic.apache.xpath.Expression
`asIterator, asNode, assertion, bool, canTraverseOutsideSubtree, error, execute, execute, executeCharsToContentHandler, isNodesetExpr, isStableNumber, num, setSourceLocator, warn, xstr`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### m_strCache

    protected java.lang.String m_strCache

Constructor Detail

### XStringForChars

    public XStringForChars(char[] val,
                           int start,
                           int length)

  Construct a XNodeSet object.

  Parameters:
    `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.

Method Detail

### fsb

    public FastStringBuffer fsb()

  Cast result object to a string.

  Returns:
    The string this wraps or the empty string if null

### appendToFsb

    public void appendToFsb(FastStringBuffer fsb)

  Cast result object to a string.

  Returns:
    The string this wraps or the empty string if null
  Overrides:
    appendToFsb in class XObject

### hasString

    public boolean hasString()

  Tell if this object contains a java String object.

  Returns:
    true if this XMLString can return a string without creating one.
  Overrides:
    hasString in class XString

### str

    public java.lang.String str()

  Cast result object to a string.

  Returns:
    The string this wraps or the empty string if null
  Overrides:
    str in class XString

### object

    public java.lang.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.

  Returns:
    The java String representation of this object.
  Overrides:
    object in class XObject

### 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.

  Parameters:
    `ch` - A non-null reference to a ContentHandler.
  Throws:
    org.xml.sax.SAXException -
  Overrides:
    dispatchCharactersEvents in class XString

### 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.

  Parameters:
    `lh` - A non-null reference to a LexicalHandler.
  Throws:
    org.xml.sax.SAXException -
  Overrides:
    dispatchAsComment in class XString

### length

    public int length()

  Returns the length of this string.

  Returns:
    the length of the sequence of characters represented by this object.
  Overrides:
    length in class XString

### 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.

  Parameters:
    `index` - the index of the character.
  Returns:
    the character at the specified index of this string. The first character is at index `0`.
  Throws:
    java.lang.IndexOutOfBoundsException - if the `index` argument is negative or not less than the length of this string.
  Overrides:
    charAt in class XString

### getChars

    public void getChars(int srcBegin,
                         int srcEnd,
                         char[] dst,
                         int dstBegin)

  Copies characters from this string into the destination character array.

  Parameters:
    `srcBegin` - index of the first character in the string to copy.
    `srcEnd` - index after the last character in the string to copy.
    `dst` - the destination array.
    `dstBegin` - the start offset in the destination array.
  Throws:
    java.lang.IndexOutOfBoundsException - If any of the following is true:
    - `srcBegin` is negative.
    - `srcBegin` is greater than `srcEnd`
    - `srcEnd` is greater than the length of this string
    - `dstBegin` is negative
    - `dstBegin+(srcEnd-srcBegin)` is larger than `dst.length`
    java.lang.NullPointerException - if `dst` is `null`
  Overrides:
    getChars in class XString

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs70
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference