• Java-Class-FC:java.nio.charset.StandardCharsets.java


    ylbtech-Java-Class-FC:java.nio.charset.StandardCharsets.java
    1.返回顶部
     
    2.返回顶部
    1.1、
    import java.nio.charset.StandardCharsets;
    1.2、
     restTemplate.getMessageConverters().set(1, new StringHttpMessageConverter(StandardCharsets.UTF_8)); // 防止中文乱码
    1.3、
    3.返回顶部
     
    4.返回顶部
    1、
    /*
     * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
     * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     *
     */
    package java.nio.charset;
    
    /**
     * Constant definitions for the standard {@link Charset Charsets}. These
     * charsets are guaranteed to be available on every implementation of the Java
     * platform.
     *
     * @see <a href="Charset#standard">Standard Charsets</a>
     * @since 1.7
     */
    public final class StandardCharsets {
    
        private StandardCharsets() {
            throw new AssertionError("No java.nio.charset.StandardCharsets instances for you!");
        }
        /**
         * Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the
         * Unicode character set
         */
        public static final Charset US_ASCII = Charset.forName("US-ASCII");
        /**
         * ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1
         */
        public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");
        /**
         * Eight-bit UCS Transformation Format
         */
        public static final Charset UTF_8 = Charset.forName("UTF-8");
        /**
         * Sixteen-bit UCS Transformation Format, big-endian byte order
         */
        public static final Charset UTF_16BE = Charset.forName("UTF-16BE");
        /**
         * Sixteen-bit UCS Transformation Format, little-endian byte order
         */
        public static final Charset UTF_16LE = Charset.forName("UTF-16LE");
        /**
         * Sixteen-bit UCS Transformation Format, byte order identified by an
         * optional byte-order mark
         */
        public static final Charset UTF_16 = Charset.forName("UTF-16");
    }
    2、
    5.返回顶部
     
     
    6.返回顶部
     
    warn 作者:ylbtech
    出处:http://ylbtech.cnblogs.com/
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    Spark ML 文本的分类
    Linxu 安装Scala
    Nginx访问非常慢
    mysql:unknown variable 'default-character-set=utf8'
    mysql 1045
    mysql: error while loading shared libraries: libnuma.so
    elasticsearch: can not run elasticsearch as root
    Java中的Class类
    ClassLoader工作机制
    遍历机器查日志
  • 原文地址:https://www.cnblogs.com/storebook/p/11096515.html
Copyright © 2020-2023  润新知