@Deprecated public final class Base64 extends Object
TransformBase64Decode| Modifier and Type | Field and Description |
|---|---|
static int |
BASE64DEFAULTLENGTH
Deprecated.
Field BASE64DEFAULTLENGTH
|
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decode(BufferedReader reader)
Deprecated.
Base64 decode the lines from the reader and return an InputStream
with the bytes.
|
static byte[] |
decode(byte[] base64)
Deprecated.
Method decode
|
static void |
decode(byte[] base64Data,
OutputStream os)
Deprecated.
Decodes Base64 data into outputstream
|
protected static void |
decode(byte[] base64Data,
OutputStream os,
int len)
Deprecated.
|
static byte[] |
decode(Element element)
Deprecated.
Method decode
Takes the
Text children of the Element and interprets
them as input for the Base64.decode() function. |
static void |
decode(InputStream is,
OutputStream os)
Deprecated.
Decodes Base64 data into outputstream
|
static byte[] |
decode(String encoded)
Deprecated.
Decodes Base64 data into octets
|
static void |
decode(String base64Data,
OutputStream os)
Deprecated.
Decodes Base64 data into outputstream
|
static BigInteger |
decodeBigIntegerFromElement(Element element)
Deprecated.
Method decodeBigIntegerFromElement
|
static BigInteger |
decodeBigIntegerFromText(Text text)
Deprecated.
Decode a base 64 string into a
BigInteger |
protected static byte[] |
decodeInternal(byte[] base64Data,
int len)
Deprecated.
|
static String |
encode(BigInteger big)
Deprecated.
Encode in Base64 the given
. |
static byte[] |
encode(BigInteger big,
int bitlen)
Deprecated.
Returns a byte-array representation of a
. |
static String |
encode(byte[] binaryData)
Deprecated.
Encode a byte array and fold lines at the standard 76th character unless
ignore line breaks property is set.
|
static String |
encode(byte[] binaryData,
int length)
Deprecated.
Encode a byte array in Base64 format and return an optionally
wrapped line.
|
static Element |
encodeToElement(Document doc,
String localName,
byte[] bytes)
Deprecated.
Method encodeToElement
|
static void |
fillElementWithBigInteger(Element element,
BigInteger biginteger)
Deprecated.
This method takes an (empty) Element and a BigInteger and adds the
base64 encoded BigInteger to the Element.
|
protected static int |
getBytesInternal(String s,
byte[] result)
Deprecated.
|
protected static boolean |
isPad(byte octet)
Deprecated.
|
protected static boolean |
isWhiteSpace(byte octet)
Deprecated.
|
protected static int |
removeWhiteSpace(byte[] data)
Deprecated.
remove WhiteSpace from MIME containing encoded Base64 data.
|
public static final int BASE64DEFAULTLENGTH
public static final String encode(BigInteger big)
BigInteger.big - public static final byte[] encode(BigInteger big, int bitlen)
BigInteger.
No sign-bit is output.
N.B.: BigInteger's toByteArray
returns eventually longer arrays because of the leading sign-bit.big - BigInteger to be convertedbitlen - int the desired length in bits of the representationbitlen bits of bigpublic static final BigInteger decodeBigIntegerFromElement(Element element) throws Base64DecodingException
element - Base64DecodingExceptionpublic static final BigInteger decodeBigIntegerFromText(Text text) throws Base64DecodingException
BigIntegertext - Base 64 encoded text.Base64DecodingExceptionpublic static final void fillElementWithBigInteger(Element element, BigInteger biginteger)
element - biginteger - public static final byte[] decode(Element element) throws Base64DecodingException
Text children of the Element and interprets
them as input for the Base64.decode() function.element - Base64DecodingExceptionpublic static final Element encodeToElement(Document doc, String localName, byte[] bytes)
doc - localName - bytes - public static final byte[] decode(byte[] base64)
throws Base64DecodingException
base64 - Base64DecodingExceptionpublic static final String encode(byte[] binaryData)
binaryData - byte[] to be base64 encodedString with encoded datapublic static final byte[] decode(BufferedReader reader) throws IOException, Base64DecodingException
reader - IOException - passes what the reader throwsIOExceptionBase64DecodingExceptionprotected static final boolean isWhiteSpace(byte octet)
protected static final boolean isPad(byte octet)
public static final String encode(byte[] binaryData, int length)
binaryData - byte[] data to be encodedlength - int length of wrapped lines; No wrapping if less than 4.String with encoded datapublic static final byte[] decode(String encoded) throws Base64DecodingException
encoded - String containing base64 encoded dataBase64DecodingException - if there is a problem decoding the dataprotected static final int getBytesInternal(String s, byte[] result)
protected static final byte[] decodeInternal(byte[] base64Data,
int len)
throws Base64DecodingException
Base64DecodingExceptionpublic static final void decode(String base64Data, OutputStream os) throws Base64DecodingException, IOException
base64Data - String containing Base64 dataos - the outputstreamIOExceptionBase64DecodingExceptionpublic static final void decode(byte[] base64Data,
OutputStream os)
throws Base64DecodingException,
IOException
base64Data - Byte array containing Base64 dataos - the outputstreamIOExceptionBase64DecodingExceptionprotected static final void decode(byte[] base64Data,
OutputStream os,
int len)
throws Base64DecodingException,
IOException
Base64DecodingExceptionIOExceptionpublic static final void decode(InputStream is, OutputStream os) throws Base64DecodingException, IOException
is - containing Base64 dataos - the outputstreamIOExceptionBase64DecodingExceptionprotected static final int removeWhiteSpace(byte[] data)
data - the byte array of base64 data (with WS)Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.