Package com.reve.utils.bytearray
Class Base64
java.lang.Object
com.reve.utils.bytearray.Base64
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intbase64Decode(byte[] data, int offset, int datalen) static intbase64Encode(byte[] data, int offset, int len) static Stringencode(byte[] data) Get the encoded base 64 string from the given byte array.static Stringencode(byte[] data, int offset, int len) Get the encoded base 64 string from the given byte array.static byte[]getEncodedBytes(byte[] data) Encode the given byte arraystatic byte[]getEncodedBytes(byte[] data, int offset, int len) Encode the given byte array
-
Constructor Details
-
Base64
public Base64()
-
-
Method Details
-
base64Decode
public static int base64Decode(byte[] data, int offset, int datalen) -
base64Encode
public static int base64Encode(byte[] data, int offset, int len) -
encode
Get the encoded base 64 string from the given byte array.- Parameters:
data- byte array to be encoded- Returns:
- the base 64 encoded string
-
encode
Get the encoded base 64 string from the given byte array.- Parameters:
data- byte array to be encodedoffset- starting index of the byte array to be encodedlen- length of the byte array to be encoded.- Returns:
- the base 64 encoded string
-
getEncodedBytes
public static byte[] getEncodedBytes(byte[] data, int offset, int len) Encode the given byte array- Parameters:
data- byte array to be encodedoffset- starting index of the byte array to be encodedlen- length of the byte array to be encoded.- Returns:
- the encoded byte array.
-
getEncodedBytes
public static byte[] getEncodedBytes(byte[] data) Encode the given byte array- Parameters:
data-data- byte array to be encoded- Returns:
- the encoded byte array.
-