Class CharactersEvent

java.lang.Object
com.bea.xml.stream.events.BaseEvent
com.bea.xml.stream.events.CharactersEvent
All Implemented Interfaces:
Characters, XMLEvent, Location, XMLStreamConstants
Direct Known Subclasses:
CommentEvent

public class CharactersEvent extends BaseEvent implements Characters
  • Constructor Details

    • CharactersEvent

      public CharactersEvent()
    • CharactersEvent

      public CharactersEvent(String data)
    • CharactersEvent

      public CharactersEvent(String data, boolean isCData)
  • Method Details

    • setSpace

      public void setSpace(boolean space)
    • isWhiteSpace

      public boolean isWhiteSpace()
      Description copied from interface: javax.xml.stream.events.Characters
      Returns true if this set of Characters is all whitespace. Whitespace inside a document is reported as CHARACTERS. This method allows checking of CHARACTERS events to see if they are composed of only whitespace characters
      Specified by:
      isWhiteSpace in interface Characters
    • isIgnorableWhiteSpace

      public boolean isIgnorableWhiteSpace()
      Description copied from interface: javax.xml.stream.events.Characters
      Return true if this is ignorableWhiteSpace. If this event is ignorableWhiteSpace its event type will be SPACE.
      Specified by:
      isIgnorableWhiteSpace in interface Characters
    • setIgnorable

      public void setIgnorable(boolean ignorable)
    • init

      protected void init()
    • getData

      public String getData()
      Description copied from interface: javax.xml.stream.events.Characters
      Get the character data of this event
      Specified by:
      getData in interface Characters
    • setData

      public void setData(String data)
    • hasData

      public boolean hasData()
    • isCData

      public boolean isCData()
      Description copied from interface: javax.xml.stream.events.Characters
      Returns true if this is a CData section. If this event is CData its event type will be CDATA If javax.xml.stream.isCoalescing is set to true CDATA Sections that are surrounded by non CDATA characters will be reported as a single Characters event. This method will return false in this case.
      Specified by:
      isCData in interface Characters
    • getDataAsArray

      public char[] getDataAsArray()
    • doWriteAsEncodedUnicode

      protected void doWriteAsEncodedUnicode(Writer writer) throws IOException
      Description copied from class: BaseEvent
      Template method to be implemented by sub-classes.
      Specified by:
      doWriteAsEncodedUnicode in class BaseEvent
      Throws:
      IOException