Home | History | Annotate | Download | only in charset
      1 /*
      2  * Copyright (C) 2010 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package java.nio.charset;
     18 
     19 /**
     20  * Convenient access to the most important built-in charsets.
     21  * @since 1.7
     22  */
     23 public final class StandardCharsets {
     24   private StandardCharsets() {
     25   }
     26 
     27   /**
     28    * The ISO-8859-1 charset.
     29    */
     30   public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");
     31 
     32   /**
     33    * The US-ASCII charset.
     34    */
     35   public static final Charset US_ASCII = Charset.forName("US-ASCII");
     36 
     37   /**
     38    * The UTF-8 charset.
     39    */
     40   public static final Charset UTF_8 = Charset.forName("UTF-8");
     41 
     42   /**
     43    * The UTF-16 charset.
     44    */
     45   public static final Charset UTF_16 = Charset.forName("UTF-16");
     46 
     47   /**
     48    * The UTF-16BE (big-endian) charset.
     49    */
     50   public static final Charset UTF_16BE = Charset.forName("UTF-16BE");
     51 
     52   /**
     53    * The UTF-16LE (little-endian) charset.
     54    */
     55   public static final Charset UTF_16LE = Charset.forName("UTF-16LE");
     56 }
     57