DepthRestrictingStreamReader (Apache CXF JavaDoc 3.0.4.redhat-621177 API)

org.apache.cxf.staxutils

## Class DepthRestrictingStreamReader

- java.lang.Object
- - org.apache.cxf.staxutils.DepthXMLStreamReader
  - - org.apache.cxf.staxutils.DepthRestrictingStreamReader

- All Implemented Interfaces:
    XMLStreamConstants, XMLStreamReader

      public class DepthRestrictingStreamReader
      extends DepthXMLStreamReader

  XMLStreamReader implementation which can be used to enforce a number of depth-restricting policies. The following properties are currently supported: - total number of elements in the document - the maximum depth of the given element; the root element will be checked by default - the maximum number of immediate child nodes for individual elements More sophisticated policies can be supported in the future.

- - ### Field Summary

    - ### Fields inherited from class org.apache.cxf.staxutils.DepthXMLStreamReader

      `reader`

    - ### Fields inherited from interface javax.xml.stream.XMLStreamConstants

      `ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DepthRestrictingStreamReader(XMLStreamReader reader, DocumentDepthProperties props)`
    `DepthRestrictingStreamReader(XMLStreamReader reader, int elementCountThreshold, int innerElementLevelThreshold, int innerElementCountThreshold)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `next()`

    - ### Methods inherited from class org.apache.cxf.staxutils.DepthXMLStreamReader

      `close, equals, getAttributeCount, getAttributeLocalName, getAttributeName, getAttributeNamespace, getAttributePrefix, getAttributeType, getAttributeValue, getAttributeValue, getCharacterEncodingScheme, getDepth, getElementText, getEncoding, getEventType, getLocalName, getLocation, getName, getNamespaceContext, getNamespaceCount, getNamespacePrefix, getNamespaceURI, getNamespaceURI, getNamespaceURI, getPIData, getPITarget, getPrefix, getProperty, getReader, getText, getTextCharacters, getTextCharacters, getTextLength, getTextStart, getVersion, hashCode, hasName, hasNext, hasText, isAttributeSpecified, isCharacters, isEndElement, isStandalone, isStartElement, isWhiteSpace, nextTag, require, standaloneSet, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### DepthRestrictingStreamReader

          public DepthRestrictingStreamReader(XMLStreamReader reader,
                                      int elementCountThreshold,
                                      int innerElementLevelThreshold,
                                      int innerElementCountThreshold)

    - #### DepthRestrictingStreamReader

          public DepthRestrictingStreamReader(XMLStreamReader reader,
                                      DocumentDepthProperties props)

  - ### Method Detail

    - #### next

          public int next()
                   throws XMLStreamException

      Specified by:
        `next` in interface `XMLStreamReader`
      Overrides:
        `next` in class `DepthXMLStreamReader`
      Throws:
        `XMLStreamException`

Apache CXF