Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/java/nio/charset/StandardCharsets.java
38918 views
/*1* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/24package java.nio.charset;2526/**27* Constant definitions for the standard {@link Charset Charsets}. These28* charsets are guaranteed to be available on every implementation of the Java29* platform.30*31* @see <a href="Charset#standard">Standard Charsets</a>32* @since 1.733*/34public final class StandardCharsets {3536private StandardCharsets() {37throw new AssertionError("No java.nio.charset.StandardCharsets instances for you!");38}39/**40* Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the41* Unicode character set42*/43public static final Charset US_ASCII = Charset.forName("US-ASCII");44/**45* ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-146*/47public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");48/**49* Eight-bit UCS Transformation Format50*/51public static final Charset UTF_8 = Charset.forName("UTF-8");52/**53* Sixteen-bit UCS Transformation Format, big-endian byte order54*/55public static final Charset UTF_16BE = Charset.forName("UTF-16BE");56/**57* Sixteen-bit UCS Transformation Format, little-endian byte order58*/59public static final Charset UTF_16LE = Charset.forName("UTF-16LE");60/**61* Sixteen-bit UCS Transformation Format, byte order identified by an62* optional byte-order mark63*/64public static final Charset UTF_16 = Charset.forName("UTF-16");65}666768