Class Base64
java.lang.Object
com.baomidou.dynamic.datasource.toolkit.Base64
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.
- Author:
- alibaba
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]static byte[]static StringbyteArrayToAltBase64(byte[] a) static StringbyteArrayToBase64(byte[] a)
-
Constructor Details
-
Base64
public Base64()
-
-
Method Details
-
byteArrayToBase64
- Parameters:
a- Translates the specified byte array into a Base64 string as per Preferences.put(byte[]).- Returns:
- str
-
byteArrayToAltBase64
- Parameters:
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.- Returns:
- str
-
base64ToByteArray
- Parameters:
s- Translates the specified Base64 string (as per Preferences.get(byte[])) into a byte array.- Returns:
- byte[]
-
altBase64ToByteArray
- Parameters:
s- Translates the specified "alternate representation" Base64 string into a byte array.- Returns:
- byte[]
-