public class Base64Coder
extends java.lang.Object
This class is used to encode and decode data in Base64 format as described in RFC 1521.
Project home page: www.
source-code.biz/base64coder/java
Author: Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland
Multi-licensed: EPL / LGPL / GPL / AL / BSD / MIT.
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decode(char[] in)
Decodes a byte array from Base64 format.
|
static byte[] |
decode(char[] in,
int iOff,
int iLen)
Decodes a byte array from Base64 format.
|
static byte[] |
decode(java.lang.String s)
Decodes a byte array from Base64 format.
|
static java.lang.String |
decodeString(java.lang.String s)
Decodes a string from Base64 format.
|
static char[] |
encode(byte[] in)
Encodes a byte array into Base64 format.
|
static char[] |
encode(byte[] in,
int iLen)
Encodes a byte array into Base64 format.
|
static char[] |
encode(byte[] in,
int iOff,
int iLen)
Encodes a byte array into Base64 format.
|
static java.lang.String |
encodeString(java.lang.String s)
Encodes a string into Base64 format.
|
public static java.lang.String encodeString(java.lang.String s)
s - A String to be encoded.public static char[] encode(byte[] in)
in - An array containing the data bytes to be encoded.public static char[] encode(byte[] in,
int iLen)
in - An array containing the data bytes to be encoded.iLen - Number of bytes to process in in.public static char[] encode(byte[] in,
int iOff,
int iLen)
in - An array containing the data bytes to be encoded.iOff - Offset of the first byte in in to be processed.iLen - Number of bytes to process in in, starting at
iOff.public static java.lang.String decodeString(java.lang.String s)
s - A Base64 String to be decoded.java.lang.IllegalArgumentException - If the input is not valid Base64 encoded data.public static byte[] decode(java.lang.String s)
s - A Base64 String to be decoded.java.lang.IllegalArgumentException - If the input is not valid Base64 encoded data.public static byte[] decode(char[] in)
in - A character array containing the Base64 encoded data.java.lang.IllegalArgumentException - If the input is not valid Base64 encoded data.public static byte[] decode(char[] in,
int iOff,
int iLen)
in - A character array containing the Base64 encoded data.iOff - Offset of the first character in in to be
processed.iLen - Number of characters to process in in, starting
at iOff.java.lang.IllegalArgumentException - If the input is not valid Base64 encoded data.Copyright (c) Fabasoft R&D GmbH, Linz, Austria, 1988-2015.