1 /*
2 * Copyright (c) 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
32 import java.net.URL;
33 import java.nio.charset.Charset;
34 import java.nio.charset.IllegalCharsetNameException;
35 import java.nio.charset.UnsupportedCharsetException;
36 import java.util.Collections;
37 import java.util.Enumeration;
38 import java.util.HashMap;
39 import java.util.Map.Entry;
40 import java.util.Map;
41 import java.util.Properties;
42 import java.util.StringTokenizer;
43 import jdk.xml.internal.SecuritySupport;
44
45 /**
46 * Provides information about encodings. Depends on the Java runtime
47 * to provides writers for the different encodings, but can be used
48 * to override encoding names and provide the last printable character
49 * for each encoding.
50 *
51 * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
52 */
53
54 public final class Encodings extends Object
55 {
56
57 /**
58 * The last printable character for unknown encodings.
59 */
60 private static final int m_defaultLastPrintable = 0x7F;
61
62 /**
63 * Standard filename for properties file with encodings data.
64 */
65 private static final String ENCODINGS_FILE = "com/sun/org/apache/xml/internal/serializer/Encodings.properties";
66
67 /**
68 * Standard filename for properties file with encodings data.
69 */
70 private static final String ENCODINGS_PROP = "com.sun.org.apache.xalan.internal.serialize.encodings";
71
|
1 /*
2 * Copyright (c) 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
31 import java.net.URL;
32 import java.nio.charset.Charset;
33 import java.nio.charset.IllegalCharsetNameException;
34 import java.nio.charset.UnsupportedCharsetException;
35 import java.util.Collections;
36 import java.util.Enumeration;
37 import java.util.HashMap;
38 import java.util.Map.Entry;
39 import java.util.Map;
40 import java.util.Properties;
41 import java.util.StringTokenizer;
42 import jdk.xml.internal.SecuritySupport;
43
44 /**
45 * Provides information about encodings. Depends on the Java runtime
46 * to provides writers for the different encodings, but can be used
47 * to override encoding names and provide the last printable character
48 * for each encoding.
49 *
50 * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
51 * @LastModified: Oct 2017
52 */
53
54 public final class Encodings extends Object
55 {
56
57 /**
58 * The last printable character for unknown encodings.
59 */
60 private static final int m_defaultLastPrintable = 0x7F;
61
62 /**
63 * Standard filename for properties file with encodings data.
64 */
65 private static final String ENCODINGS_FILE = "com/sun/org/apache/xml/internal/serializer/Encodings.properties";
66
67 /**
68 * Standard filename for properties file with encodings data.
69 */
70 private static final String ENCODINGS_PROP = "com.sun.org.apache.xalan.internal.serialize.encodings";
71
|