public class Base64
======================================================= Author: liying - liruoer2008@yeah.net Datetime: 2017/11/5 22:10 Description: Base64 Utils Remarks: =======================================================
| 限定符和类型 | 字段和说明 |
|---|---|
static Base64 |
INSTANCE
=======================================================
Author: liying - liruoer2008@yeah.net
Datetime: 2017/11/5 22:10
Description: Base64 Utils
Remarks:
=======================================================
|
| 限定符和类型 | 方法和说明 |
|---|---|
static kotlin.Array[] |
decode(java.lang.String src)
Decodes a Base64 encoded String into a newly-allocated byte array
using the {@link Base64} encoding scheme.
|
static kotlin.Array[] |
decode(kotlin.Array[] src)
Decodes all bytes from the input byte array using the {@link Base64}
encoding scheme, writing the results into a newly-allocated output
byte array. The returned byte array is of the length of the resulting
bytes.
|
static java.lang.String |
decode(java.lang.String src,
java.nio.charset.Charset charset)
Decodes a Base64 encoded String
using the {@link Base64} encoding scheme.
|
static java.lang.String |
decode(java.lang.String src)
Decodes a Base64 encoded String
using the {@link Base64} encoding scheme.
|
static void |
decodeToFile(java.lang.String src,
java.io.File file)
Decodes a Base64 encoded String into a newly-allocated byte array
using the {@link Base64} encoding scheme.
|
static void |
decodeToFile(kotlin.Array[] src,
java.io.File file)
Decodes all bytes from the input byte array using the {@link Base64}
encoding scheme, writing the results into a newly-allocated output
byte array. The returned byte array is of the length of the resulting
bytes.
|
static java.lang.String |
encode(kotlin.Array[] src)
Encodes the specified byte array into a String using the {@link Base64}
encoding scheme.
|
static java.lang.String |
encode(java.lang.String src,
java.nio.charset.Charset charset)
Encodes the specified String into a String using the {@link Base64}
encoding scheme.
|
static java.lang.String |
encode(java.lang.String src)
Encodes the specified String into a String using the {@link Base64}
encoding scheme.
|
static java.lang.String |
encode(java.io.File src)
Encodes the specified File into a String using the {@link Base64}
encoding scheme.
|
static kotlin.Array[] |
encodeByteArray(kotlin.Array[] src)
Encodes all bytes from the specified byte array into a newly-allocated
byte array using the {@link Base64} encoding scheme. The returned byte
array is of the length of the resulting bytes.
|
public static Base64 INSTANCE
======================================================= Author: liying - liruoer2008@yeah.net Datetime: 2017/11/5 22:10 Description: Base64 Utils Remarks: =======================================================
@JvmStatic
@NotNull
public static java.lang.String encode(@NotNull
kotlin.Array[] src)
Encodes the specified byte array into a String using the {@link Base64} encoding scheme.
src - the byte array to encode@JvmStatic
@NotNull
public static kotlin.Array[] encodeByteArray(@NotNull
kotlin.Array[] src)
Encodes all bytes from the specified byte array into a newly-allocated byte array using the {@link Base64} encoding scheme. The returned byte array is of the length of the resulting bytes.
src - the byte array to encode@JvmStatic
@NotNull
public static kotlin.Array[] decode(@NotNull
java.lang.String src)
Decodes a Base64 encoded String into a newly-allocated byte array using the {@link Base64} encoding scheme.
src - the string to decodeIllegalArgumentException - if {@code src} is not in valid Base64 scheme@JvmStatic
public static void decodeToFile(@NotNull
java.lang.String src,
@NotNull
java.io.File file)
Decodes a Base64 encoded String into a newly-allocated byte array using the {@link Base64} encoding scheme.
src - the string to decodefile - the file to be writeIllegalArgumentException - if {@code src} is not in valid Base64 scheme@JvmStatic
@NotNull
public static kotlin.Array[] decode(@NotNull
kotlin.Array[] src)
Decodes all bytes from the input byte array using the {@link Base64} encoding scheme, writing the results into a newly-allocated output byte array. The returned byte array is of the length of the resulting bytes.
src - the byte array to decodeIllegalArgumentException - if {@code src} is not in valid Base64 scheme@JvmStatic
public static void decodeToFile(@NotNull
kotlin.Array[] src,
@NotNull
java.io.File file)
Decodes all bytes from the input byte array using the {@link Base64} encoding scheme, writing the results into a newly-allocated output byte array. The returned byte array is of the length of the resulting bytes.
src - the byte array to decodefile - the file to be writeIllegalArgumentException - if {@code src} is not in valid Base64 scheme@JvmStatic
@JvmOverloads
@NotNull
public static java.lang.String encode(@NotNull
java.lang.String src,
@NotNull
java.nio.charset.Charset charset)
Encodes the specified String into a String using the {@link Base64} encoding scheme.
src - the string to encode.charset - Encodes this string using the specified character set.@JvmStatic
@JvmOverloads
@NotNull
public static java.lang.String encode(@NotNull
java.lang.String src)
Encodes the specified String into a String using the {@link Base64} encoding scheme.
src - the string to encode.@JvmStatic
@NotNull
public static java.lang.String encode(@NotNull
java.io.File src)
Encodes the specified File into a String using the {@link Base64} encoding scheme.
src - the file to encode.@JvmStatic
@JvmOverloads
@NotNull
public static java.lang.String decode(@NotNull
java.lang.String src,
@NotNull
java.nio.charset.Charset charset)
Decodes a Base64 encoded String using the {@link Base64} encoding scheme.
src - the string to decodecharset - Converts the data from the specified array of bytes to characters using the specified character setIllegalArgumentException - if {@code src} is not in valid Base64 scheme@JvmStatic
@JvmOverloads
@NotNull
public static java.lang.String decode(@NotNull
java.lang.String src)
Decodes a Base64 encoded String using the {@link Base64} encoding scheme.
src - the string to decodeIllegalArgumentException - if {@code src} is not in valid Base64 scheme