/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/** DummyEvent is an abstract class. It provides functionality for most of the
* function of XMLEvent.
*
* @author Neeraj Bajaj Sun Microsystems,Inc.
* @author K.Venugopal Sun Microsystems,Inc.
*
*/
// Make sure that getLocation() never returns null. Instead, return this dummy location
// that indicates "nowhere" as effectively as possible.
/* Event type this event corresponds to */
private int fEventType;
public DummyEvent() {
}
public DummyEvent(int i) {
fEventType = i;
}
public int getEventType() {
return fEventType;
}
}
public boolean isStartElement() {
}
public boolean isEndElement() {
}
public boolean isEntityReference() {
}
public boolean isProcessingInstruction() {
}
public boolean isCharacterData() {
}
public boolean isStartDocument() {
}
public boolean isEndDocument() {
}
return fLocation;
}
} else {
}
}
/** Returns this event as Characters, may result in
* a class cast exception if this event is not Characters.
*/
return (Characters)this;
}
/** Returns this event as an end element event, may result in
* a class cast exception if this event is not a end element.
*/
return (EndElement)this;
}
/** Returns this event as a start element event, may result in
* a class cast exception if this event is not a start element.
*/
return (StartElement)this;
}
/** This method is provided for implementations to provide
* optional type information about the associated event.
* It is optional and will return null if no information
* is available.
*/
//Base class will take care of providing extra information about this event.
return null;
}
/** A utility function to check if this event is an Attribute.
* @see Attribute
*/
public boolean isAttribute() {
}
/** A utility function to check if this event is Characters.
* @see Characters
*/
public boolean isCharacters() {
}
/** A utility function to check if this event is a Namespace.
* @see Namespace
*/
public boolean isNamespace() {
}
/** This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.
* No indentation or whitespace should be outputted.
*
* Any user defined event type SHALL have this method
* called when being written to on an output stream.
* Built in Event types MUST implement this method,
* but implementations MAY choose not call these methods
* for optimizations reasons when writing out built in
* Events to an output stream.
* The output generated MUST be equivalent in terms of the
* infoset expressed.
*
* @param writer The writer that will output the data
* @throws XMLStreamException if there is a fatal error writing the event
*/
try {
} catch (IOException e) {
throw new XMLStreamException(e);
}
}
/** Helper method in order to expose IOException.
* @param writer The writer that will output the data
* @throws XMLStreamException if there is a fatal error writing the event
* @throws IOException if there is an IO error
*/
throws IOException, XMLStreamException;
/** Helper method to escape < > & for characters event and
* quotes, lt and amps for Entity
*/
throws IOException
{
loop:
for (; i < len; ++i) {
case '<':
start = i + 1;
break;
case '&':
start = i + 1;
break;
case '>':
start = i + 1;
break;
case '"':
start = i + 1;
break;
}
}
// Write any pending data
}
public DummyLocation() {
}
public int getCharacterOffset() {
return -1;
}
public int getColumnNumber() {
return -1;
}
public int getLineNumber() {
return -1;
}
return null;
}
return null;
}
}
}