Package org.jvnet.staxex
Class Base64Encoder
- java.lang.Object
-
- org.jvnet.staxex.Base64Encoder
-
class Base64Encoder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static char[]encodeMap
-
Constructor Summary
Constructors Constructor Description Base64Encoder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static charencode(int i)static byteencodeByte(int i)private static char[]initEncodeMap()static java.lang.Stringprint(byte[] input, int offset, int len)static intprint(byte[] input, int offset, int len, char[] buf, int ptr)Encodes a byte array into a char array by doing base64 encoding.
-
-
-
Method Detail
-
initEncodeMap
private static char[] initEncodeMap()
-
encode
public static char encode(int i)
-
encodeByte
public static byte encodeByte(int i)
-
print
public static java.lang.String print(byte[] input, int offset, int len)
-
print
public static int print(byte[] input, int offset, int len, char[] buf, int ptr)Encodes a byte array into a char array by doing base64 encoding. The caller must supply a big enough buffer.- Returns:
- the value of
ptr+((len+2)/3)*4, which is the new offset in the output buffer where the further bytes should be placed.
-
-