Package javax.xml.stream.events

Examples of javax.xml.stream.events.StartDocument


    if (o == null)
      return false;
    if (this == o)
      return true;

    StartDocument start = (StartDocument) o;

    if (getCharacterEncodingScheme() != null) {
      if (! getCharacterEncodingScheme().equals
            (start.getCharacterEncodingScheme()))
        return false;
    }
    else if (start.getCharacterEncodingScheme() != null)
      return false;

    if (getSystemId() != null) {
      if (! getSystemId().equals(start.getSystemId()))
        return false;
    }
    else if (start.getSystemId() != null)
      return false;

    if (getVersion() != null) {
      if (! getVersion().equals(start.getVersion()))
        return false;
    }
    else if (start.getVersion() != null)
      return false;

    return encodingSet() == start.encodingSet() &&
           isStandalone() == start.isStandalone() &&
           standaloneSet() == start.standaloneSet();
  }
View Full Code Here


            rdr = xmlInputFactory.createXMLEventReader(
                    new InputStreamReader(is));
            while (rdr.hasNext()) {
                final XMLEvent ev = rdr.nextEvent();
                if (ev.isStartDocument()) {
                    final StartDocument sd = (StartDocument) ev;
                    encoding = sd.getCharacterEncodingScheme();
                    break;
                }
            }
        } catch (XMLStreamException e) {
            if (rdr != null) {
View Full Code Here

TOP

Related Classes of javax.xml.stream.events.StartDocument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.