public class Base64 extends Object
org.apache.xml.security.transforms.implementations.TransformBase64Decode| Modifier and Type | Field and Description |
|---|---|
static int |
BASE64DEFAULTLENGTH
Field BASE64DEFAULTLENGTH
|
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decode(byte[] base64Data) |
static void |
decode(byte[] base64Data,
OutputStream os)
Decodes Base64 data into outputstream
|
static void |
decode(InputStream is,
OutputStream os)
Decodes Base64 data into outputstream
|
static byte[] |
decode(String encoded)
Decodes Base64 data into octects
|
protected static byte[] |
decodeInternal(byte[] base64Data) |
static String |
encode(byte[] binaryData) |
static String |
encode(byte[] binaryData,
int length) |
char[] |
encodeData(byte[] binaryData)
Encodes hex octects into Base64
|
static char[] |
encodeData(byte[] binaryData,
int length)
Encode a byte array in Base64 format and return an optionally
wrapped line.
|
static void |
encodeToStream(byte[] binaryData,
int offset,
int length,
OutputStream stream) |
static void |
encodeToStream(byte[] binaryData,
int length,
OutputStream stream) |
static void |
encodeToStream(ByteArray binaryData,
int length,
OutputStream stream) |
protected static boolean |
isPad(byte octect) |
protected static boolean |
isWhiteSpace(byte octect) |
protected static int |
removeWhiteSpace(byte[] data)
remove WhiteSpace from MIME containing encoded Base64 data.
|
public static final int BASE64DEFAULTLENGTH
protected static final boolean isWhiteSpace(byte octect)
protected static final boolean isPad(byte octect)
public char[] encodeData(byte[] binaryData)
binaryData - Array containing binaryDatapublic static char[] encodeData(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 String encode(byte[] binaryData, int length)
public static String encode(byte[] binaryData)
public static void encodeToStream(byte[] binaryData,
int length,
OutputStream stream)
throws IOException
IOExceptionpublic static void encodeToStream(byte[] binaryData,
int offset,
int length,
OutputStream stream)
throws IOException
IOExceptionpublic static void encodeToStream(ByteArray binaryData, int length, OutputStream stream) throws IOException
IOExceptionpublic static final byte[] decode(String encoded) throws org.apache.xml.security.exceptions.Base64DecodingException
encoded - Byte array containing Base64 dataorg.apache.xml.security.exceptions.Base64DecodingExceptionpublic static final byte[] decode(byte[] base64Data)
throws org.apache.xml.security.exceptions.Base64DecodingException
org.apache.xml.security.exceptions.Base64DecodingExceptionprotected static final byte[] decodeInternal(byte[] base64Data)
throws org.apache.xml.security.exceptions.Base64DecodingException
org.apache.xml.security.exceptions.Base64DecodingExceptionpublic static final void decode(byte[] base64Data,
OutputStream os)
throws org.apache.xml.security.exceptions.Base64DecodingException,
IOException
base64Data - Byte array containing Base64 dataos - the outputstreamIOExceptionorg.apache.xml.security.exceptions.Base64DecodingExceptionpublic static final void decode(InputStream is, OutputStream os) throws org.apache.xml.security.exceptions.Base64DecodingException, IOException
is - containing Base64 dataos - the outputstreamIOExceptionorg.apache.xml.security.exceptions.Base64DecodingExceptionprotected static int removeWhiteSpace(byte[] data)
data - the byte array of base64 data (with WS)Copyright © 2005–2018 Oracle Corporation. All rights reserved.