emptyserializer.java
来自「JAVA的一些源码 JAVA2 STANDARD EDITION DEVELO」· Java 代码 · 共 679 行 · 第 1/2 页
JAVA
679 行
/* * Copyright 2003-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *//* * $Id: EmptySerializer.java,v 1.5 2004/02/17 04:18:19 minchau Exp $ */package com.sun.org.apache.xml.internal.serializer;import java.io.IOException;import java.io.OutputStream;import java.io.Writer;import java.util.Hashtable;import java.util.Properties;import java.util.Vector;import javax.xml.transform.SourceLocator;import javax.xml.transform.Transformer;import org.w3c.dom.Node;import org.xml.sax.Attributes;import org.xml.sax.ContentHandler;import org.xml.sax.Locator;import org.xml.sax.SAXException;import org.xml.sax.SAXParseException;/** * This class is an adapter class. Its only purpose is to be extended and * for that extended class to over-ride all methods that are to be used. */public class EmptySerializer implements SerializationHandler{ protected static final String ERR = "EmptySerializer method not over-ridden"; /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#asContentHandler() */ private static void throwUnimplementedException() { /* TODO: throw this exception for real. * Some users of this class do not over-ride all methods that * they use, which is a violation of the intended use of this * class. Those tests used to end in error, but fail when this * exception is enabled. Perhaps that is an indication of what * the true problem is. Such tests include copy56,58,59,60 for * both Xalan-J interpretive and for XSLTC. - bjm */ // throw new RuntimeException(err); return; } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#asContentHandler() */ public ContentHandler asContentHandler() throws IOException { throwUnimplementedException(); return null; } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#setContentHandler(org.xml.sax.ContentHandler) */ public void setContentHandler(ContentHandler ch) { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#close() */ public void close() { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#getOutputFormat() */ public Properties getOutputFormat() { throwUnimplementedException(); return null; } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#getOutputStream() */ public OutputStream getOutputStream() { throwUnimplementedException(); return null; } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#getWriter() */ public Writer getWriter() { throwUnimplementedException(); return null; } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#reset() */ public boolean reset() { throwUnimplementedException(); return false; } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#serialize(org.w3c.dom.Node) */ public void serialize(Node node) throws IOException { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#setCdataSectionElements(java.util.Vector) */ public void setCdataSectionElements(Vector URI_and_localNames) { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#setEscaping(boolean) */ public boolean setEscaping(boolean escape) throws SAXException { throwUnimplementedException(); return false; } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#setIndent(boolean) */ public void setIndent(boolean indent) { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#setIndentAmount(int) */ public void setIndentAmount(int spaces) { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#setOutputFormat(java.util.Properties) */ public void setOutputFormat(Properties format) { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#setOutputStream(java.io.OutputStream) */ public void setOutputStream(OutputStream output) { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#setVersion(java.lang.String) */ public void setVersion(String version) { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#setWriter(java.io.Writer) */ public void setWriter(Writer writer) { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#setTransformer(javax.xml.transform.Transformer) */ public void setTransformer(Transformer transformer) { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#getTransformer() */ public Transformer getTransformer() { throwUnimplementedException(); return null; } /** * @see com.sun.org.apache.xml.internal.serializer.SerializationHandler#flushPending() */ public void flushPending() throws SAXException { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler#addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) */ public void addAttribute( String uri, String localName, String rawName, String type, String value) throws SAXException { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler#addAttributes(org.xml.sax.Attributes) */ public void addAttributes(Attributes atts) throws SAXException { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler#addAttribute(java.lang.String, java.lang.String) */ public void addAttribute(String name, String value) { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler#characters(java.lang.String) */ public void characters(String chars) throws SAXException { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler#endElement(java.lang.String) */ public void endElement(String elemName) throws SAXException { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler#startDocument() */ public void startDocument() throws SAXException { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String) */ public void startElement(String uri, String localName, String qName) throws SAXException { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler#startElement(java.lang.String) */ public void startElement(String qName) throws SAXException { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler#namespaceAfterStartElement(java.lang.String, java.lang.String) */ public void namespaceAfterStartElement(String uri, String prefix) throws SAXException { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler#startPrefixMapping(java.lang.String, java.lang.String, boolean) */ public boolean startPrefixMapping( String prefix, String uri, boolean shouldFlush) throws SAXException { throwUnimplementedException(); return false; } /** * @see com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler#entityReference(java.lang.String) */ public void entityReference(String entityName) throws SAXException { throwUnimplementedException(); } /** * @see com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler#getNamespaceMappings() */ public NamespaceMappings getNamespaceMappings() { throwUnimplementedException(); return null; } /** * @see com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler#getPrefix(java.lang.String) */ public String getPrefix(String uri) { throwUnimplementedException(); return null; } /** * @see com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler#getNamespaceURI(java.lang.String, boolean) */ public String getNamespaceURI(String name, boolean isElement) { throwUnimplementedException(); return null; } /** * @see com.sun.org.apache.xml.internal.serializer.ExtendedContentHandler#getNamespaceURIFromPrefix(java.lang.String) */ public String getNamespaceURIFromPrefix(String prefix) { throwUnimplementedException(); return null; } /** * @see org.xml.sax.ContentHandler#setDocumentLocator(org.xml.sax.Locator) */ public void setDocumentLocator(Locator arg0) { throwUnimplementedException(); } /** * @see org.xml.sax.ContentHandler#endDocument() */ public void endDocument() throws SAXException { throwUnimplementedException(); } /** * @see org.xml.sax.ContentHandler#startPrefixMapping(java.lang.String, java.lang.String)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?