src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/Encodings.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. |
|
3 * @LastModified: Oct 2017 |
3 */ |
4 */ |
4 /* |
5 /* |
5 * Licensed to the Apache Software Foundation (ASF) under one or more |
6 * Licensed to the Apache Software Foundation (ASF) under one or more |
6 * contributor license agreements. See the NOTICE file distributed with |
7 * contributor license agreements. See the NOTICE file distributed with |
7 * this work for additional information regarding copyright ownership. |
8 * this work for additional information regarding copyright ownership. |
62 static final String DEFAULT_ENCODING = "UTF8"; |
63 static final String DEFAULT_ENCODING = "UTF8"; |
63 |
64 |
64 // note that the size of this Map |
65 // note that the size of this Map |
65 // is bounded by the number of encodings recognized by EncodingMap; |
66 // is bounded by the number of encodings recognized by EncodingMap; |
66 // therefore it poses no static mutability risk. |
67 // therefore it poses no static mutability risk. |
67 private static final Map<String, EncodingInfo> _encodings = new ConcurrentHashMap(); |
68 private static final Map<String, EncodingInfo> _encodings = new ConcurrentHashMap<>(); |
68 |
69 |
69 /** |
70 /** |
70 * @param encoding a MIME charset name, or null. |
71 * @param encoding a MIME charset name, or null. |
71 */ |
72 */ |
72 static EncodingInfo getEncodingInfo(String encoding, boolean allowJavaNames) throws UnsupportedEncodingException { |
73 static EncodingInfo getEncodingInfo(String encoding, boolean allowJavaNames) throws UnsupportedEncodingException { |