Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rice.p2p.util
Class XMLParser

    java.lang.Object
      rice.p2p.util.XMLParser

All Implemented Interfaces:
  org.xmlpull.v1.XmlPullParser

public class XMLParser
extends java.lang.Object
implements org.xmlpull.v1.XmlPullParser

This class is a memory-efficient implementation of most of the XML pull parsing API.

Version:
  $Id: pretty.settings,v 1.3 2005/03/11 20:22:33 jeffh Exp $
Author:
  jeffh

Nested Class Summary
`class` | `XMLParser.CharArrayBuffer` This class implements a char array buffer

Field Summary
`protected java.lang.String[]` | `attributes` If the tag parsed was a start tag, the list of attribute-> value pairs
`protected char[]` | `buffer` The internal buffer used to process data
`static int` | `BUFFER_SIZE` The size of the internal buffer to allocate
`protected int` | `bufferLimit` DESCRIBE THE FIELD
`protected int` | `bufferPosition` Internal pointers into the buffer
`protected StringCache` | `cache` The StringCache used to reduce the memory requirements
`static java.lang.String[][]` | `ENTITIES` DESCRIBE THE FIELD
`protected boolean` | `inTag` Whether or not we are currently in a tag...
`protected int` | `mark` Internal variable which keeps track of the current mark
`protected XMLParser.CharArrayBuffer` | `marked` DESCRIBE THE FIELD
`static int` | `MAX_ATTRIBUTES` DESCRIBE THE FIELD
`protected java.lang.String` | `name` If the tag parsed was a start/end, the name of the tag
`protected int` | `numAttributes` DESCRIBE THE FIELD
`static char[]` | `QUOTE` DESCRIBE THE FIELD
`protected java.io.Reader` | `reader` The internal reader used to read data
`static char[]` | `SINGLE` DESCRIBE THE FIELD
`static char[]` | `TAG_END` DESCRIBE THE FIELD
`protected java.util.Stack` | `tags` The internal stack of tags which have been read
`protected java.lang.String` | `text` If the tag parsed was text, the text
`static char[]` | `WHITESPACE` DESCRIBE THE FIELD
`static char[]` | `WHITESPACE_OR_EQUALS` DESCRIBE THE FIELD
`static char[]` | `WHITESPACE_OR_TAG_END` DESCRIBE THE FIELD

Fields inherited from interface org.xmlpull.v1.XmlPullParser
`CDSECT, COMMENT, DOCDECL, END_DOCUMENT, END_TAG, ENTITY_REF, FEATURE_PROCESS_DOCDECL, FEATURE_PROCESS_NAMESPACES, FEATURE_REPORT_NAMESPACE_ATTRIBUTES, FEATURE_VALIDATION, IGNORABLE_WHITESPACE, NO_NAMESPACE, PROCESSING_INSTRUCTION, START_DOCUMENT, START_TAG, TEXT, TYPES`

Constructor Summary
`XMLParser()` Constructor

Method Summary
`protected void` | `addAttribute(java.lang.String key, java.lang.String value)` Internal method which adds an attributes
`protected void` | `clearAttributes()` Internal method which clears the list of attributes
`protected boolean` | `contains(char[] chars, char c)` Internal method which checks for existence
`protected java.lang.String` | `convert(java.lang.String string)` Internal method which deconverts all of the HTML/XML entities like &, >, <, etc...
`protected char` | `current()` Method which returns the current char in the buffer
`void` | `defineEntityReplacementText(java.lang.String entityName, java.lang.String replacementText)` DESCRIBE THE METHOD
`protected void` | `expect(char c)` An assertion method
`protected void` | `fillBuffer()` Internal method which actually fills the buffer
`int` | `getAttributeCount()` Gets the AttributeCount attribute of the XMLParser object
`java.lang.String` | `getAttributeName(int index)` Gets the AttributeName attribute of the XMLParser object
`java.lang.String` | `getAttributeNamespace(int index)` Gets the AttributeNamespace attribute of the XMLParser object
`java.lang.String` | `getAttributePrefix(int index)` Gets the AttributePrefix attribute of the XMLParser object
`java.lang.String` | `getAttributeType(int index)` Gets the AttributeType attribute of the XMLParser object
`java.lang.String` | `getAttributeValue(int index)` Gets the AttributeValue attribute of the XMLParser object
`java.lang.String` | `getAttributeValue(java.lang.String namespace, java.lang.String name)` Returns the attributes value identified by namespace URI and namespace localName.
`int` | `getColumnNumber()` Gets the ColumnNumber attribute of the XMLParser object
`int` | `getDepth()` Gets the Depth attribute of the XMLParser object
`int` | `getEventType()` Returns the type of the current event (START_TAG, END_TAG, TEXT, etc.)
`boolean` | `getFeature(java.lang.String name)` Gets the Feature attribute of the XMLParser object
`java.lang.String` | `getInputEncoding()` Gets the InputEncoding attribute of the XMLParser object
`int` | `getLineNumber()` Gets the LineNumber attribute of the XMLParser object
`java.lang.String` | `getName()` For START_TAG or END_TAG events, the (local) name of the current element is returned when namespaces are enabled.
`java.lang.String` | `getNamespace()` Gets the Namespace attribute of the XMLParser object
`java.lang.String` | `getNamespace(java.lang.String prefix)` Gets the Namespace attribute of the XMLParser object
`int` | `getNamespaceCount(int depth)` Gets the NamespaceCount attribute of the XMLParser object
`java.lang.String` | `getNamespacePrefix(int pos)` Gets the NamespacePrefix attribute of the XMLParser object
`java.lang.String` | `getNamespaceUri(int pos)` Gets the NamespaceUri attribute of the XMLParser object
`java.lang.String` | `getPositionDescription()` Gets the PositionDescription attribute of the XMLParser object
`java.lang.String` | `getPrefix()` Gets the Prefix attribute of the XMLParser object
`java.lang.Object` | `getProperty(java.lang.String name)` Gets the Property attribute of the XMLParser object
`java.lang.String` | `getText()` Returns the text content of the current event as String.
`char[]` | `getTextCharacters(int[] holderForStartAndLength)` Gets the TextCharacters attribute of the XMLParser object
`boolean` | `isAttributeDefault(int index)` Gets the AttributeDefault attribute of the XMLParser object
`boolean` | `isEmptyElementTag()` Gets the EmptyElementTag attribute of the XMLParser object
`boolean` | `isWhitespace()` Checks whether the current TEXT event contains only whitespace characters.
`boolean` | `isWhitespace(java.lang.String text)` Internal method which checks for existence
`protected void` | `mark()` Sets the mark
`int` | `next()` Get next parsing event - element content wil be coalesced and only one TEXT event must be returned for whole element content (comments and processing instructions will be ignored and emtity references must be expanded or exception mus be thrown if entity reerence can not be exapnded).
`int` | `nextTag()` DESCRIBE THE METHOD
`java.lang.String` | `nextText()` DESCRIBE THE METHOD
`int` | `nextToken()` DESCRIBE THE METHOD
`protected void` | `parseAttributes()` Method which parses all of the attributes of a start tag
`protected int` | `parseDocumentTag()` Method which parses a document tag
`protected int` | `parseEndTag()` Method which parses an end tag of the form
`protected int` | `parseEndTag(java.lang.String tag)` Method which parses an end tag of the form
`protected int` | `parseStartTag()` Method which parses a start tag
`protected int` | `parseTag()` Internal method which parses a tag
`protected int` | `parseText()` Method which parses an end tag of the form
`protected java.lang.String` | `parseUntil(char c)` Method which parses and returns up to the next token
`protected java.lang.String` | `parseUntil(char[] chars)` Method which parses and returns up to the next token
`protected void` | `parseUntilNot(char[] chars)` Method which parses up to the next token
`void` | `require(int type, java.lang.String namespace, java.lang.String name)` DESCRIBE THE METHOD
`void` | `setFeature(java.lang.String name, boolean state)` ----- UNSUPPORTED METHODS -----
`void` | `setInput(java.io.InputStream inputStream, java.lang.String inputEncoding)` Sets the Input attribute of the XMLParser object
`void` | `setInput(java.io.Reader in)` Set the input source for parser to the given reader and resets the parser.
`void` | `setProperty(java.lang.String name, java.lang.Object value)` Sets the Property attribute of the XMLParser object
`protected void` | `step()` Method which steps forward in the buffer
`protected java.lang.String` | `unmark()` Unsets the mark

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

Field Detail

### reader

    protected java.io.Reader reader

  The internal reader used to read data

### buffer

    protected char[] buffer

  The internal buffer used to process data

### bufferPosition

    protected int bufferPosition

  Internal pointers into the buffer

### bufferLimit

    protected int bufferLimit

  DESCRIBE THE FIELD

### cache

    protected StringCache cache

  The StringCache used to reduce the memory requirements

### tags

    protected java.util.Stack tags

  The internal stack of tags which have been read

### name

    protected java.lang.String name

  If the tag parsed was a start/end, the name of the tag

### text

    protected java.lang.String text

  If the tag parsed was text, the text

### attributes

    protected java.lang.String[] attributes

  If the tag parsed was a start tag, the list of attribute-> value pairs

### numAttributes

    protected int numAttributes

  DESCRIBE THE FIELD

### inTag

    protected boolean inTag

  Whether or not we are currently in a tag...

### mark

    protected int mark

  Internal variable which keeps track of the current mark

### marked

    protected XMLParser.CharArrayBuffer marked

  DESCRIBE THE FIELD

### BUFFER_SIZE

    public static final int BUFFER_SIZE

  The size of the internal buffer to allocate

  See Also:
    Constant Field Values

### MAX_ATTRIBUTES

    public static final int MAX_ATTRIBUTES

  DESCRIBE THE FIELD

  See Also:
    Constant Field Values

### QUOTE

    public static final char[] QUOTE

  DESCRIBE THE FIELD

### TAG_END

    public static final char[] TAG_END

  DESCRIBE THE FIELD

### WHITESPACE

    public static final char[] WHITESPACE

  DESCRIBE THE FIELD

### WHITESPACE_OR_TAG_END

    public static final char[] WHITESPACE_OR_TAG_END

  DESCRIBE THE FIELD

### WHITESPACE_OR_EQUALS

    public static final char[] WHITESPACE_OR_EQUALS

  DESCRIBE THE FIELD

### SINGLE

    public static final char[] SINGLE

  DESCRIBE THE FIELD

### ENTITIES

    public static final java.lang.String[][] ENTITIES

  DESCRIBE THE FIELD

Constructor Detail

### XMLParser

    public XMLParser()

  Constructor

Method Detail

### getText

    public java.lang.String getText()

  Returns the text content of the current event as String. The value returned depends on current event type, for example for TEXT event it is element content (this is typical case when next() is used). See description of nextToken() for detailed description of possible returned values for different types of events.

  NOTE: in case of ENTITY_REF, this method returns the entity replacement text (or null if not available). This is the only case where getText() and getTextCharacters() return different values.

  Specified by:
    `getText` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    The Text value
  See Also:
    `getEventType()`, `next()`, `nextToken()`

### getName

    public java.lang.String getName()

  For START_TAG or END_TAG events, the (local) name of the current element is returned when namespaces are enabled. When namespace processing is disabled, the raw name is returned. For ENTITY_REF events, the entity name is returned. If the current event is not START_TAG, END_TAG, or ENTITY_REF, null is returned.

  Please note: To reconstruct the raw element name when namespaces are enabled and the prefix is not null, you will need to add the prefix and a colon to localName..

  Specified by:
    `getName` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    The Name value

### getAttributeValue

    public java.lang.String getAttributeValue(java.lang.String namespace,
                                              java.lang.String name)

  Returns the attributes value identified by namespace URI and namespace localName. If namespaces are disabled namespace must be null. If current event type is not START_TAG then IndexOutOfBoundsException will be thrown.

  NOTE: attribute value must be normalized (including entity replacement text if PROCESS_DOCDECL is false) as described in XML 1.0 section 3.3.3 Attribute-Value Normalization

  Specified by:
    `getAttributeValue` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `namespace` - Namespace of the attribute if namespaces are enabled otherwise must be null
    `name` - If namespaces enabled local name of attribute otherwise just attribute name
  Returns:
    value of attribute or null if attribute with given name does not exist
  See Also:
    `defineEntityReplacementText(java.lang.String, java.lang.String)`

### getEventType

    public int getEventType()
                     throws org.xmlpull.v1.XmlPullParserException

  Returns the type of the current event (START_TAG, END_TAG, TEXT, etc.)

  Specified by:
    `getEventType` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    The EventType value
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION
  See Also:
    `next()`, `nextToken()`

### isWhitespace

    public boolean isWhitespace()
                         throws org.xmlpull.v1.XmlPullParserException

  Checks whether the current TEXT event contains only whitespace characters. For IGNORABLE_WHITESPACE, this is always true. For TEXT and CDSECT, false is returned when the current event text contains at least one non-white space character. For any other event type an exception is thrown.

  Please note: non-validating parsers are not able to distinguish whitespace and ignorable whitespace, except from whitespace outside the root element. Ignorable whitespace is reported as separate event, which is exposed via nextToken only.

  Specified by:
    `isWhitespace` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    The Whitespace value
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION

### isWhitespace

    public boolean isWhitespace(java.lang.String text)

  Internal method which checks for existence

  Parameters:
    `text` - DESCRIBE THE PARAMETER
  Returns:
    The Whitespace value

### getFeature

    public boolean getFeature(java.lang.String name)

  Gets the Feature attribute of the XMLParser object

  Specified by:
    `getFeature` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `name` - DESCRIBE THE PARAMETER
  Returns:
    The Feature value

### getProperty

    public java.lang.Object getProperty(java.lang.String name)

  Gets the Property attribute of the XMLParser object

  Specified by:
    `getProperty` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `name` - DESCRIBE THE PARAMETER
  Returns:
    The Property value

### getInputEncoding

    public java.lang.String getInputEncoding()

  Gets the InputEncoding attribute of the XMLParser object

  Specified by:
    `getInputEncoding` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    The InputEncoding value

### getNamespaceCount

    public int getNamespaceCount(int depth)
                          throws org.xmlpull.v1.XmlPullParserException

  Gets the NamespaceCount attribute of the XMLParser object

  Specified by:
    `getNamespaceCount` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `depth` - DESCRIBE THE PARAMETER
  Returns:
    The NamespaceCount value
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION

### getNamespacePrefix

    public java.lang.String getNamespacePrefix(int pos)
                                        throws org.xmlpull.v1.XmlPullParserException

  Gets the NamespacePrefix attribute of the XMLParser object

  Specified by:
    `getNamespacePrefix` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `pos` - DESCRIBE THE PARAMETER
  Returns:
    The NamespacePrefix value
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION

### getNamespaceUri

    public java.lang.String getNamespaceUri(int pos)
                                     throws org.xmlpull.v1.XmlPullParserException

  Gets the NamespaceUri attribute of the XMLParser object

  Specified by:
    `getNamespaceUri` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `pos` - DESCRIBE THE PARAMETER
  Returns:
    The NamespaceUri value
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION

### getNamespace

    public java.lang.String getNamespace(java.lang.String prefix)

  Gets the Namespace attribute of the XMLParser object

  Specified by:
    `getNamespace` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `prefix` - DESCRIBE THE PARAMETER
  Returns:
    The Namespace value

### getDepth

    public int getDepth()

  Gets the Depth attribute of the XMLParser object

  Specified by:
    `getDepth` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    The Depth value

### getPositionDescription

    public java.lang.String getPositionDescription()

  Gets the PositionDescription attribute of the XMLParser object

  Specified by:
    `getPositionDescription` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    The PositionDescription value

### getLineNumber

    public int getLineNumber()

  Gets the LineNumber attribute of the XMLParser object

  Specified by:
    `getLineNumber` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    The LineNumber value

### getColumnNumber

    public int getColumnNumber()

  Gets the ColumnNumber attribute of the XMLParser object

  Specified by:
    `getColumnNumber` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    The ColumnNumber value

### getTextCharacters

    public char[] getTextCharacters(int[] holderForStartAndLength)

  Gets the TextCharacters attribute of the XMLParser object

  Specified by:
    `getTextCharacters` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `holderForStartAndLength` - DESCRIBE THE PARAMETER
  Returns:
    The TextCharacters value

### getNamespace

    public java.lang.String getNamespace()

  Gets the Namespace attribute of the XMLParser object

  Specified by:
    `getNamespace` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    The Namespace value

### getPrefix

    public java.lang.String getPrefix()

  Gets the Prefix attribute of the XMLParser object

  Specified by:
    `getPrefix` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    The Prefix value

### isEmptyElementTag

    public boolean isEmptyElementTag()
                              throws org.xmlpull.v1.XmlPullParserException

  Gets the EmptyElementTag attribute of the XMLParser object

  Specified by:
    `isEmptyElementTag` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    The EmptyElementTag value
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION

### getAttributeNamespace

    public java.lang.String getAttributeNamespace(int index)

  Gets the AttributeNamespace attribute of the XMLParser object

  Specified by:
    `getAttributeNamespace` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `index` - DESCRIBE THE PARAMETER
  Returns:
    The AttributeNamespace value

### getAttributePrefix

    public java.lang.String getAttributePrefix(int index)

  Gets the AttributePrefix attribute of the XMLParser object

  Specified by:
    `getAttributePrefix` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `index` - DESCRIBE THE PARAMETER
  Returns:
    The AttributePrefix value

### getAttributeType

    public java.lang.String getAttributeType(int index)

  Gets the AttributeType attribute of the XMLParser object

  Specified by:
    `getAttributeType` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `index` - DESCRIBE THE PARAMETER
  Returns:
    The AttributeType value

### isAttributeDefault

    public boolean isAttributeDefault(int index)

  Gets the AttributeDefault attribute of the XMLParser object

  Specified by:
    `isAttributeDefault` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `index` - DESCRIBE THE PARAMETER
  Returns:
    The AttributeDefault value

### getAttributeCount

    public int getAttributeCount()

  Gets the AttributeCount attribute of the XMLParser object

  Specified by:
    `getAttributeCount` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    The AttributeCount value

### getAttributeName

    public java.lang.String getAttributeName(int index)

  Gets the AttributeName attribute of the XMLParser object

  Specified by:
    `getAttributeName` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `index` - DESCRIBE THE PARAMETER
  Returns:
    The AttributeName value

### getAttributeValue

    public java.lang.String getAttributeValue(int index)

  Gets the AttributeValue attribute of the XMLParser object

  Specified by:
    `getAttributeValue` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `index` - DESCRIBE THE PARAMETER
  Returns:
    The AttributeValue value

### setInput

    public void setInput(java.io.Reader in)
                  throws org.xmlpull.v1.XmlPullParserException

  Set the input source for parser to the given reader and resets the parser. The event type is set to the initial value START_DOCUMENT. Setting the reader to null will just stop parsing and reset parser state, allowing the parser to free internal resources such as parsing buffers.

  Specified by:
    `setInput` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `in` - The new Input value
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION

### setFeature

    public void setFeature(java.lang.String name,
                           boolean state)
                    throws org.xmlpull.v1.XmlPullParserException

  ----- UNSUPPORTED METHODS -----

  Specified by:
    `setFeature` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `name` - The new Feature value
    `state` - The new Feature value
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION

### setProperty

    public void setProperty(java.lang.String name,
                            java.lang.Object value)
                     throws org.xmlpull.v1.XmlPullParserException

  Sets the Property attribute of the XMLParser object

  Specified by:
    `setProperty` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `name` - The new Property value
    `value` - The new Property value
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION

### setInput

    public void setInput(java.io.InputStream inputStream,
                         java.lang.String inputEncoding)
                  throws org.xmlpull.v1.XmlPullParserException

  Sets the Input attribute of the XMLParser object

  Specified by:
    `setInput` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `inputStream` - The new Input value
    `inputEncoding` - The new Input value
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION

### next

    public int next()
             throws org.xmlpull.v1.XmlPullParserException,
                    java.io.IOException

  Get next parsing event - element content wil be coalesced and only one TEXT event must be returned for whole element content (comments and processing instructions will be ignored and emtity references must be expanded or exception mus be thrown if entity reerence can not be exapnded). If element content is empty (content is "") then no TEXT event will be reported.

  NOTE: empty element (such as <tag/>) will be reported with two separate events: START_TAG, END_TAG - it must be so to preserve parsing equivalency of empty element to <tag></tag>. (see isEmptyElementTag ())

  Specified by:
    `next` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    DESCRIBE THE RETURN VALUE
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION
    `java.io.IOException` - DESCRIBE THE EXCEPTION
  See Also:
    `isEmptyElementTag()`, `XmlPullParser.START_TAG`, `XmlPullParser.TEXT`, `XmlPullParser.END_TAG`, `XmlPullParser.END_DOCUMENT`

### fillBuffer

    protected void fillBuffer()
                       throws java.io.IOException

  Internal method which actually fills the buffer

  Throws:
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### current

    protected char current()
                    throws java.io.IOException

  Method which returns the current char in the buffer

  Returns:
    The current char
  Throws:
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### step

    protected void step()

  Method which steps forward in the buffer

### mark

    protected void mark()

  Sets the mark

### unmark

    protected java.lang.String unmark()

  Unsets the mark

  Returns:
    DESCRIBE THE RETURN VALUE

### clearAttributes

    protected void clearAttributes()

  Internal method which clears the list of attributes

### addAttribute

    protected void addAttribute(java.lang.String key,
                                java.lang.String value)

  Internal method which adds an attributes

  Parameters:
    `key` - The feature to be added to the Attribute attribute
    `value` - The feature to be added to the Attribute attribute

### expect

    protected void expect(char c)
                   throws org.xmlpull.v1.XmlPullParserException,
                          java.io.IOException

  An assertion method

  Parameters:
    `c` - DESCRIBE THE PARAMETER
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### contains

    protected boolean contains(char[] chars,
                               char c)

  Internal method which checks for existence

  Parameters:
    `chars` - The chars to check for
    `c` - DESCRIBE THE PARAMETER
  Returns:
    DESCRIBE THE RETURN VALUE

### parseUntil

    protected java.lang.String parseUntil(char[] chars)
                                   throws java.io.IOException

  Method which parses and returns up to the next token

  Parameters:
    `chars` - DESCRIBE THE PARAMETER
  Returns:
    The token
  Throws:
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### parseUntil

    protected java.lang.String parseUntil(char c)
                                   throws java.io.IOException

  Method which parses and returns up to the next token

  Parameters:
    `c` - DESCRIBE THE PARAMETER
  Returns:
    The token
  Throws:
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### parseUntilNot

    protected void parseUntilNot(char[] chars)
                          throws java.io.IOException

  Method which parses up to the next token

  Parameters:
    `chars` - DESCRIBE THE PARAMETER
  Throws:
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### parseEndTag

    protected int parseEndTag(java.lang.String tag)
                       throws org.xmlpull.v1.XmlPullParserException,
                              java.io.IOException

  Method which parses an end tag of the form

  Parameters:
    `tag` - DESCRIBE THE PARAMETER
  Returns:
    DESCRIBE THE RETURN VALUE
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### parseTag

    protected int parseTag()
                    throws org.xmlpull.v1.XmlPullParserException,
                           java.io.IOException

  Internal method which parses a tag

  Returns:
    DESCRIBE THE RETURN VALUE
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### parseEndTag

    protected int parseEndTag()
                       throws org.xmlpull.v1.XmlPullParserException,
                              java.io.IOException

  Method which parses an end tag of the form

  Returns:
    DESCRIBE THE RETURN VALUE
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### parseStartTag

    protected int parseStartTag()
                         throws org.xmlpull.v1.XmlPullParserException,
                                java.io.IOException

  Method which parses a start tag

  Returns:
    DESCRIBE THE RETURN VALUE
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### parseDocumentTag

    protected int parseDocumentTag()
                            throws org.xmlpull.v1.XmlPullParserException,
                                   java.io.IOException

  Method which parses a document tag

  Returns:
    DESCRIBE THE RETURN VALUE
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### parseAttributes

    protected void parseAttributes()
                            throws org.xmlpull.v1.XmlPullParserException,
                                   java.io.IOException

  Method which parses all of the attributes of a start tag

  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### parseText

    protected int parseText()
                     throws org.xmlpull.v1.XmlPullParserException,
                            java.io.IOException

  Method which parses an end tag of the form

  Returns:
    DESCRIBE THE RETURN VALUE
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### convert

    protected java.lang.String convert(java.lang.String string)

  Internal method which deconverts all of the HTML/XML entities like &, >, <, etc...

  Parameters:
    `string` - The string to convert
  Returns:
    The result

### defineEntityReplacementText

    public void defineEntityReplacementText(java.lang.String entityName,
                                            java.lang.String replacementText)
                                     throws org.xmlpull.v1.XmlPullParserException

  DESCRIBE THE METHOD

  Specified by:
    `defineEntityReplacementText` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `entityName` - DESCRIBE THE PARAMETER
    `replacementText` - DESCRIBE THE PARAMETER
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION

### nextToken

    public int nextToken()
                  throws org.xmlpull.v1.XmlPullParserException,
                         java.io.IOException

  DESCRIBE THE METHOD

  Specified by:
    `nextToken` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    DESCRIBE THE RETURN VALUE
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### require

    public void require(int type,
                        java.lang.String namespace,
                        java.lang.String name)
                 throws org.xmlpull.v1.XmlPullParserException,
                        java.io.IOException

  DESCRIBE THE METHOD

  Specified by:
    `require` in interface `org.xmlpull.v1.XmlPullParser`
  Parameters:
    `type` - DESCRIBE THE PARAMETER
    `namespace` - DESCRIBE THE PARAMETER
    `name` - DESCRIBE THE PARAMETER
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### nextText

    public java.lang.String nextText()
                              throws org.xmlpull.v1.XmlPullParserException,
                                     java.io.IOException

  DESCRIBE THE METHOD

  Specified by:
    `nextText` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    DESCRIBE THE RETURN VALUE
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### nextTag

    public int nextTag()
                throws org.xmlpull.v1.XmlPullParserException,
                       java.io.IOException

  DESCRIBE THE METHOD

  Specified by:
    `nextTag` in interface `org.xmlpull.v1.XmlPullParser`
  Returns:
    DESCRIBE THE RETURN VALUE
  Throws:
    `org.xmlpull.v1.XmlPullParserException` - DESCRIBE THE EXCEPTION
    `java.io.IOException` - DESCRIBE THE EXCEPTION

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.