jdk/src/share/classes/java/nio/charset/StandardCharsets.java
author sherman
Thu, 27 Feb 2014 09:43:28 -0800
changeset 23029 8b6176ab95fb
parent 9676 5663e62f8d7e
permissions -rw-r--r--
8035814: Broken link in java.nio.charset.StandardCharsets Summary: fixed the broken link Reviewed-by: alanb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9526
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
     1
/*
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
     2
 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
     4
 *
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    10
 *
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    15
 * accompanied this code).
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    16
 *
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    20
 *
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    23
 * questions.
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    24
 */
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    25
package java.nio.charset;
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    26
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    27
/**
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    28
 * Constant definitions for the standard {@link Charset Charsets}. These
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    29
 * charsets are guaranteed to be available on every implementation of the Java
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    30
 * platform.
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    31
 *
23029
8b6176ab95fb 8035814: Broken link in java.nio.charset.StandardCharsets
sherman
parents: 9676
diff changeset
    32
 * @see <a href="Charset.html#standard">Standard Charsets</a>
9526
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    33
 * @since 1.7
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    34
 */
9676
5663e62f8d7e 7041612: Rename StandardCharset to StandardCharsets
mduigou
parents: 9526
diff changeset
    35
public final class StandardCharsets {
9526
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    36
9676
5663e62f8d7e 7041612: Rename StandardCharset to StandardCharsets
mduigou
parents: 9526
diff changeset
    37
    private StandardCharsets() {
5663e62f8d7e 7041612: Rename StandardCharset to StandardCharsets
mduigou
parents: 9526
diff changeset
    38
        throw new AssertionError("No java.nio.charset.StandardCharsets instances for you!");
9526
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    39
    }
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    40
    /**
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    41
     * Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    42
     * Unicode character set
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    43
     */
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    44
    public static final Charset US_ASCII = Charset.forName("US-ASCII");
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    45
    /**
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    46
     * ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    47
     */
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    48
    public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    49
    /**
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    50
     * Eight-bit UCS Transformation Format
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    51
     */
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    52
    public static final Charset UTF_8 = Charset.forName("UTF-8");
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    53
    /**
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    54
     * Sixteen-bit UCS Transformation Format, big-endian byte order
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    55
     */
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    56
    public static final Charset UTF_16BE = Charset.forName("UTF-16BE");
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    57
    /**
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    58
     * Sixteen-bit UCS Transformation Format, little-endian byte order
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    59
     */
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    60
    public static final Charset UTF_16LE = Charset.forName("UTF-16LE");
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    61
    /**
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    62
     * Sixteen-bit UCS Transformation Format, byte order identified by an
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    63
     * optional byte-order mark
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    64
     */
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    65
    public static final Charset UTF_16 = Charset.forName("UTF-16");
a80328f995f1 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.
mduigou
parents:
diff changeset
    66
}