< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/Encodings.java

Print this page


   1 /*
   2  * Copyright (c) 2015, 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 
  23 package com.sun.org.apache.xml.internal.serialize;


  25 
  26 import com.sun.org.apache.xerces.internal.util.EncodingMap;
  27 import java.io.UnsupportedEncodingException;
  28 import java.util.Locale;
  29 import java.util.Map;
  30 import java.util.concurrent.ConcurrentHashMap;
  31 
  32 
  33 /**
  34  * Provides information about encodings. Depends on the Java runtime
  35  * to provides writers for the different encodings, but can be used
  36  * to override encoding names and provide the last printable character
  37  * for each encoding.
  38  *
  39  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
  40  *
  41  * @deprecated As of JDK 9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
  42  * is replaced by that of Xalan. Main class
  43  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  44  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.


  45  */
  46 @Deprecated
  47 class Encodings
  48 {
  49 
  50 
  51     /**
  52      * The last printable character for unknown encodings.
  53      */
  54     static final int DEFAULT_LAST_PRINTABLE = 0x7F;
  55 
  56     // last printable character for Unicode-compatible encodings
  57     static final int LAST_PRINTABLE_UNICODE = 0xffff;
  58     // unicode-compliant encodings; can express plane 0
  59     static final String[] UNICODE_ENCODINGS = {
  60         "Unicode", "UnicodeBig", "UnicodeLittle", "GB2312", "UTF8", "UTF-16",
  61     };
  62     // default (Java) encoding if none supplied:
  63     static final String DEFAULT_ENCODING = "UTF8";
  64 


   1 /*
   2  * Copyright (c) 2015, 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 
  22 package com.sun.org.apache.xml.internal.serialize;


  24 
  25 import com.sun.org.apache.xerces.internal.util.EncodingMap;
  26 import java.io.UnsupportedEncodingException;
  27 import java.util.Locale;
  28 import java.util.Map;
  29 import java.util.concurrent.ConcurrentHashMap;
  30 
  31 
  32 /**
  33  * Provides information about encodings. Depends on the Java runtime
  34  * to provides writers for the different encodings, but can be used
  35  * to override encoding names and provide the last printable character
  36  * for each encoding.
  37  *
  38  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
  39  *
  40  * @deprecated As of JDK 9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
  41  * is replaced by that of Xalan. Main class
  42  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  43  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  44  *
  45  * @LastModified: Oct 2017
  46  */
  47 @Deprecated
  48 class Encodings
  49 {
  50 
  51 
  52     /**
  53      * The last printable character for unknown encodings.
  54      */
  55     static final int DEFAULT_LAST_PRINTABLE = 0x7F;
  56 
  57     // last printable character for Unicode-compatible encodings
  58     static final int LAST_PRINTABLE_UNICODE = 0xffff;
  59     // unicode-compliant encodings; can express plane 0
  60     static final String[] UNICODE_ENCODINGS = {
  61         "Unicode", "UnicodeBig", "UnicodeLittle", "GB2312", "UTF8", "UTF-16",
  62     };
  63     // default (Java) encoding if none supplied:
  64     static final String DEFAULT_ENCODING = "UTF8";
  65 


< prev index next >