< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/EmptySerializer.java

Print this page


   1 /*
   2  * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * @LastModified: Oct 2017
   4  */
   5 /*
   6  * Licensed to the Apache Software Foundation (ASF) under one or more
   7  * contributor license agreements.  See the NOTICE file distributed with
   8  * this work for additional information regarding copyright ownership.
   9  * The ASF licenses this file to You under the Apache License, Version 2.0
  10  * (the "License"); you may not use this file except in compliance with
  11  * the License.  You may obtain a copy of the License at
  12  *
  13  *     http://www.apache.org/licenses/LICENSE-2.0
  14  *
  15  * Unless required by applicable law or agreed to in writing, software
  16  * distributed under the License is distributed on an "AS IS" BASIS,
  17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18  * See the License for the specific language governing permissions and
  19  * limitations under the License.
  20  */
  21 
  22 package com.sun.org.apache.xml.internal.serializer;
  23 


  26 import java.io.Writer;
  27 import java.util.List;
  28 import java.util.Properties;
  29 import javax.xml.transform.SourceLocator;
  30 import javax.xml.transform.Transformer;
  31 import org.w3c.dom.Node;
  32 import org.xml.sax.Attributes;
  33 import org.xml.sax.ContentHandler;
  34 import org.xml.sax.Locator;
  35 import org.xml.sax.SAXException;
  36 import org.xml.sax.SAXParseException;
  37 
  38 /**
  39  * This class is an adapter class. Its only purpose is to be extended and
  40  * for that extended class to over-ride all methods that are to be used.
  41  *
  42  * This class is not a public API, it is only public because it is used
  43  * across package boundaries.
  44  *
  45  * @xsl.usage internal

  46  */
  47 public class EmptySerializer implements SerializationHandler
  48 {
  49     protected static final String ERR = "EmptySerializer method not over-ridden";
  50 
  51     protected void couldThrowIOException() throws IOException {
  52         return; // don't do anything.
  53     }
  54 
  55     protected void couldThrowSAXException() throws SAXException {
  56         return; // don't do anything.
  57     }
  58 
  59     protected void couldThrowSAXException(char[] chars, int off, int len)
  60         throws SAXException
  61     {
  62         return; // don't do anything.
  63     }
  64 
  65     protected void couldThrowSAXException(String elemQName)


   1 /*
   2  * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.

   3  */
   4 /*
   5  * Licensed to the Apache Software Foundation (ASF) under one or more
   6  * contributor license agreements.  See the NOTICE file distributed with
   7  * this work for additional information regarding copyright ownership.
   8  * The ASF licenses this file to You under the Apache License, Version 2.0
   9  * (the "License"); you may not use this file except in compliance with
  10  * the License.  You may obtain a copy of the License at
  11  *
  12  *     http://www.apache.org/licenses/LICENSE-2.0
  13  *
  14  * Unless required by applicable law or agreed to in writing, software
  15  * distributed under the License is distributed on an "AS IS" BASIS,
  16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17  * See the License for the specific language governing permissions and
  18  * limitations under the License.
  19  */
  20 
  21 package com.sun.org.apache.xml.internal.serializer;
  22 


  25 import java.io.Writer;
  26 import java.util.List;
  27 import java.util.Properties;
  28 import javax.xml.transform.SourceLocator;
  29 import javax.xml.transform.Transformer;
  30 import org.w3c.dom.Node;
  31 import org.xml.sax.Attributes;
  32 import org.xml.sax.ContentHandler;
  33 import org.xml.sax.Locator;
  34 import org.xml.sax.SAXException;
  35 import org.xml.sax.SAXParseException;
  36 
  37 /**
  38  * This class is an adapter class. Its only purpose is to be extended and
  39  * for that extended class to over-ride all methods that are to be used.
  40  *
  41  * This class is not a public API, it is only public because it is used
  42  * across package boundaries.
  43  *
  44  * @xsl.usage internal
  45  * @LastModified: Oct 2017
  46  */
  47 public class EmptySerializer implements SerializationHandler
  48 {
  49     protected static final String ERR = "EmptySerializer method not over-ridden";
  50 
  51     protected void couldThrowIOException() throws IOException {
  52         return; // don't do anything.
  53     }
  54 
  55     protected void couldThrowSAXException() throws SAXException {
  56         return; // don't do anything.
  57     }
  58 
  59     protected void couldThrowSAXException(char[] chars, int off, int len)
  60         throws SAXException
  61     {
  62         return; // don't do anything.
  63     }
  64 
  65     protected void couldThrowSAXException(String elemQName)


< prev index next >