EventReaderDelegate (Java EE 5)

Java EE API


javax.xml.stream.util Class EventReaderDelegate

java.lang.Object
  extended by javax.xml.stream.util.EventReaderDelegate
All Implemented Interfaces:
Iterator, XMLEventReader

public class EventReaderDelegate
extends Object
implements XMLEventReader

Implements: XMLEventReader

该类是用于派生 XMLEventReader 过滤器的基类。 此类设计用于 XMLEventReader 和应用程序的 XMLEventReader 之间。默认情况下,每种方法除了调用父接口中的相应方法之外,不执行任何操作。
英文文档:

This is the base class for deriving an XMLEventReader filter. This class is designed to sit between an XMLEventReader and an application's XMLEventReader. By default each method does nothing but call the corresponding method on the parent interface.

Version:
1.0
Author:
Copyright (c) 2003 by BEA Systems. All Rights Reserved.
See Also:
XMLEventReader, StreamReaderDelegate

Constructor Summary
 
Method Summary
 void
 String
 XMLEventReader
 Object
 boolean
 Object
 XMLEvent
 XMLEvent
 XMLEvent
 void
 void
 
Methods inherited from class java.lang.Object
 

Constructor Detail

public EventReaderDelegate()
构造没有父过滤器的空过滤器。
英文文档:

EventReaderDelegate

public EventReaderDelegate()
Construct an empty filter with no parent.


public EventReaderDelegate(XMLEventReader reader)
用指定的父过滤器来构造一个过滤器。
reader 父级
英文文档:

EventReaderDelegate

public EventReaderDelegate(XMLEventReader reader)
Construct an filter with the specified parent.

Parameters:
reader - the parent

Method Detail

public void setParent(XMLEventReader reader)
设置此实例的父实例。
reader 新的父实例
英文文档:

setParent

public void setParent(XMLEventReader reader)
Set the parent of this instance.

Parameters:
reader - the new parent

public XMLEventReader getParent()
获取此实例的父实例。
return 父实例;如果没有设置父实例,则返回 null
英文文档:

getParent

public XMLEventReader getParent()
Get the parent of this instance.

Returns:
the parent or null if none is set

public XMLEvent nextEvent() throws XMLStreamException
英文文档:

nextEvent

public XMLEvent nextEvent()
                   throws XMLStreamException
Description copied from interface: XMLEventReader
Get the next XMLEvent

Specified by:
nextEvent in interface XMLEventReader
Throws:
XMLStreamException - if there is an error with the underlying XML.
See Also:
XMLEvent

public Object next()
英文文档:

next

public Object next()
Specified by:
next in interface Iterator

public boolean hasNext()
英文文档:

hasNext

public boolean hasNext()
Description copied from interface: XMLEventReader
Check if there are more events. Returns true if there are more events and false otherwise.

Specified by:
hasNext in interface Iterator
Specified by:
hasNext in interface XMLEventReader
Returns:
true if the event reader has more events, false otherwise

public XMLEvent peek() throws XMLStreamException
英文文档:

peek

public XMLEvent peek()
              throws XMLStreamException
Description copied from interface: XMLEventReader
Check the next XMLEvent without reading it from the stream. Returns null if the stream is at EOF or has no more XMLEvents. A call to peek() will be equal to the next return of next().

Specified by:
peek in interface XMLEventReader
Throws:
XMLStreamException
See Also:
XMLEvent

public void close() throws XMLStreamException
英文文档:

close

public void close()
           throws XMLStreamException
Description copied from interface: XMLEventReader
Frees any resources associated with this Reader. This method does not close the underlying input source.

Specified by:
close in interface XMLEventReader
Throws:
XMLStreamException - if there are errors freeing associated resources

public String getElementText() throws XMLStreamException
英文文档:

getElementText

public String getElementText()
                      throws XMLStreamException
Description copied from interface: XMLEventReader
Reads the content of a text-only element. Precondition: the current event is START_ELEMENT. Postcondition: The current event is the corresponding END_ELEMENT.

Specified by:
getElementText in interface XMLEventReader
Throws:
XMLStreamException - if the current event is not a START_ELEMENT or if a non text element is encountered

public XMLEvent nextTag() throws XMLStreamException
英文文档:

nextTag

public XMLEvent nextTag()
                 throws XMLStreamException
Description copied from interface: XMLEventReader
Skips any insignificant space events until a START_ELEMENT or END_ELEMENT is reached. If anything other than space characters are encountered, an exception is thrown. This method should be used when processing element-only content because the parser is not able to recognize ignorable whitespace if the DTD is missing or not interpreted.

Specified by:
nextTag in interface XMLEventReader
Throws:
XMLStreamException - if anything other than space characters are encountered

public Object getProperty(String name) throws IllegalArgumentException
英文文档:

getProperty

public Object getProperty(String name)
                   throws IllegalArgumentException
Description copied from interface: XMLEventReader
Get the value of a feature/property from the underlying implementation

Specified by:
getProperty in interface XMLEventReader
Parameters:
name - The name of the property
Returns:
The value of the property
Throws:
IllegalArgumentException - if the property is not supported

public void remove()
英文文档:

remove

public void remove()
Specified by:
remove in interface Iterator


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!