01: /*
02: * $Id: EndDocumentEvent.java,v 1.2 2006/04/01 06:01:34 jeffsuttor Exp $
03: */
04:
05: /*
06: * The contents of this file are subject to the terms
07: * of the Common Development and Distribution License
08: * (the License). You may not use this file except in
09: * compliance with the License.
10: *
11: * You can obtain a copy of the license at
12: * https://glassfish.dev.java.net/public/CDDLv1.0.html.
13: * See the License for the specific language governing
14: * permissions and limitations under the License.
15: *
16: * When distributing Covered Code, include this CDDL
17: * Header Notice in each file and include the License file
18: * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
19: * If applicable, add the following below the CDDL Header,
20: * with the fields enclosed by brackets [] replaced by
21: * you own identifying information:
22: * "Portions Copyrighted [year] [name of copyright owner]"
23: *
24: * [Name of File] [ver.__] [Date]
25: *
26: * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
27: */
28:
29: package com.sun.xml.stream.events;
30:
31: import javax.xml.stream.events.EndDocument;
32: import java.io.Writer;
33: import javax.xml.stream.XMLStreamConstants;
34:
35: /**
36: * This class contains information about EndDocument event.
37: *
38: * @author Neeraj Bajaj, Sun Microsystems.
39: */
40:
41: public class EndDocumentEvent extends DummyEvent implements EndDocument {
42:
43: public EndDocumentEvent() {
44: init();
45: }
46:
47: protected void init() {
48: setEventType(XMLStreamConstants.END_DOCUMENT);
49: }
50:
51: public String toString() {
52: return "ENDDOCUMENT";
53: }
54:
55: /** This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.
56: * No indentation or whitespace should be outputted.
57: *
58: * Any user defined event type SHALL have this method
59: * called when being written to on an output stream.
60: * Built in Event types MUST implement this method,
61: * but implementations MAY choose not call these methods
62: * for optimizations reasons when writing out built in
63: * Events to an output stream.
64: * The output generated MUST be equivalent in terms of the
65: * infoset expressed.
66: *
67: * @param writer The writer that will output the data
68: * @throws XMLStreamException if there is a fatal error writing the event
69: */
70: public void writeAsEncodedUnicode(Writer writer)
71: throws javax.xml.stream.XMLStreamException {
72: }
73:
74: }
|