类 Base64


  • public class Base64
    extends Object
    Copyright 1999-2018 Alibaba Group Holding Ltd.

    Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

    作者:
    alibaba
    • 构造器详细资料

      • Base64

        public Base64()
    • 方法详细资料

      • byteArrayToBase64

        public static String byteArrayToBase64​(byte[] a)
        参数:
        a - Translates the specified byte array into a Base64 string as per Preferences.put(byte[]).
        返回:
        str
      • byteArrayToAltBase64

        public static String byteArrayToAltBase64​(byte[] a)
        参数:
        a - Translates the specified byte array into an "alternate representation" Base64 string. This non-standard variant uses an alphabet that does not contain the uppercase alphabetic characters, which makes it suitable for use in situations where case-folding occurs.
        返回:
        str
      • base64ToByteArray

        public static byte[] base64ToByteArray​(String s)
        参数:
        s - Translates the specified Base64 string (as per Preferences.get(byte[])) into a byte array.
        返回:
        byte[]
      • altBase64ToByteArray

        public static byte[] altBase64ToByteArray​(String s)
        参数:
        s - Translates the specified "alternate representation" Base64 string into a byte array.
        返回:
        byte[]