| java.lang.Object com.sun.xml.wss.impl.misc.Base64
Base64 | public class Base64 (Code) | | Implementation of MIME's Base64 encoding and decoding conversions.
Optimized code. (raw version taken from oreilly.jonathan.util,
and currently com.sun.org.apache.xerces.internal.ds.util.Base64)
author: Raul Benito(Of the xerces copy, and little adaptations). author: Anli Shundi author: Christian Geuer-Pollmann See Also: RFC 2045 See Also: com.sun.org.apache.xml.internal.security.transforms.implementations.TransformBase64Decode |
Method Summary | |
final public static byte[] | decode(String encoded) | final public static byte[] | decode(byte[] base64Data) | final public static void | decode(byte[] base64Data, OutputStream os) | final public static void | decode(InputStream is, OutputStream os) | final protected static byte[] | decodeInternal(byte[] base64Data) | public static String | encode(byte[] binaryData, int length) | public static String | encode(byte[] binaryData) | public char[] | encodeData(byte[] binaryData) | public static char[] | encodeData(byte[] binaryData, int length) Encode a byte array in Base64 format and return an optionally
wrapped line.
Parameters: binaryData - byte[] data to be encoded Parameters: length - int length of wrapped lines; No wrapping if less than 4. | public static void | encodeToStream(byte[] binaryData, int length, OutputStream stream) | public static void | encodeToStream(byte[] binaryData, int offset, int length, OutputStream stream) | public static void | encodeToStream(ByteArray binaryData, int length, OutputStream stream) | final protected static boolean | isPad(byte octect) | final protected static boolean | isWhiteSpace(byte octect) | protected static int | removeWhiteSpace(byte[] data) remove WhiteSpace from MIME containing encoded Base64 data. |
BASE64DEFAULTLENGTH | final public static int BASE64DEFAULTLENGTH(Code) | | Field BASE64DEFAULTLENGTH
|
decode | final public static byte[] decode(String encoded) throws Base64DecodingException(Code) | | Decodes Base64 data into octects
Parameters: encoded - Byte array containing Base64 data Array containind decoded data. throws: Base64DecodingException - |
decode | final public static byte[] decode(byte[] base64Data) throws Base64DecodingException(Code) | | |
decode | final public static void decode(byte[] base64Data, OutputStream os) throws Base64DecodingException, IOException(Code) | | Decodes Base64 data into outputstream
Parameters: base64Data - Byte array containing Base64 data Parameters: os - the outputstream throws: IOException - throws: Base64DecodingException - |
decode | final public static void decode(InputStream is, OutputStream os) throws Base64DecodingException, IOException(Code) | | Decodes Base64 data into outputstream
Parameters: is - containing Base64 data Parameters: os - the outputstream throws: IOException - throws: Base64DecodingException - |
decodeInternal | final protected static byte[] decodeInternal(byte[] base64Data) throws Base64DecodingException(Code) | | |
encode | public static String encode(byte[] binaryData, int length)(Code) | | |
encodeData | public char[] encodeData(byte[] binaryData)(Code) | | Encodes hex octects into Base64
Parameters: binaryData - Array containing binaryData Encoded Base64 array |
encodeData | public static char[] encodeData(byte[] binaryData, int length)(Code) | | Encode a byte array in Base64 format and return an optionally
wrapped line.
Parameters: binaryData - byte[] data to be encoded Parameters: length - int length of wrapped lines; No wrapping if less than 4. a String with encoded data |
isPad | final protected static boolean isPad(byte octect)(Code) | | |
isWhiteSpace | final protected static boolean isWhiteSpace(byte octect)(Code) | | |
removeWhiteSpace | protected static int removeWhiteSpace(byte[] data)(Code) | | remove WhiteSpace from MIME containing encoded Base64 data.
Parameters: data - the byte array of base64 data (with WS) the new length |
|
|