|
Jadex 0.941 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjadex.util.Base64
Base64
Contains lots of utilities for coding and decoding text and character arrays fore
and back to the Base64 encoding. It is quite the fastest that I know.
Constructor Summary | |
Base64()
|
Method Summary | |
static byte[] |
decode(byte[] code)
This is a wrapper to decode(final byte[] code, final int from, final int len) |
static byte[] |
decode(byte[] src,
int from,
int len)
a copy of the char part |
static byte[] |
decode(char[] code)
This is a wrapper to decode(final char[] code, final int from, final int len) |
static byte[] |
decode(char[] code,
int from,
int len)
This will decode base64 data without line feeds. |
static byte[] |
decode76(char[] code)
decodeCRLF(code, 0, code.length, 76) |
static byte[] |
decodeCRLF(char[] code,
int from,
int len)
This will decode base64 data with CRLF at 4 character boundary. |
static byte[] |
decodeCRLF(char[] code,
int from,
int len,
int llen)
This will decode base64 data. |
static byte[] |
decodeFailSafe(char[] code)
|
static byte[] |
decodeFailSafe(char[] code,
int from,
int len)
This removes all bad characters from the char array. |
static byte[] |
encode(byte[] text)
|
static byte[] |
encode(byte[] text,
int llen)
This will encode the text. |
static byte[] |
encode(byte[] text,
int from,
int len)
This will encode the text without line feeds added |
static int |
encode(byte[] src,
int sstart,
int len,
byte[] dest,
int dstart)
This will encode the text without line feeds added. |
static char[] |
toCharArray(byte[] text)
This is a wrapper to toCharArray(final byte[] text, final int from, final int len) |
static char[] |
toCharArray(byte[] text,
int llen)
This will encode the text. |
static char[] |
toCharArray(byte[] text,
int from,
int len)
This will encode the text without line feeds added |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Base64()
Method Detail |
public static final char[] toCharArray(byte[] text)
toCharArray(final byte[] text, final int from, final int len)
text
-
public static final char[] toCharArray(byte[] text, int from, int len)
text
- from
- where to startlen
- how long is the byte array
public static final byte[] encode(byte[] text)
text
-
public static final byte[] encode(byte[] text, int from, int len)
text
- from
- where to startlen
- how long is the byte array
public static final int encode(byte[] src, int sstart, int len, byte[] dest, int dstart)
src
- sstart
- where to startlen
- how long is the byte arraydest
- dstart
-
public static final char[] toCharArray(byte[] text, int llen)
lb
characters.
text
- llen
- the length of line (without CRLF) must be a multiple of 4
public static final byte[] encode(byte[] text, int llen)
lb
characters.
text
- llen
- the length of line (without CRLF) must be a multiple of 4
public static final byte[] decode(char[] code)
decode(final char[] code, final int from, final int len)
code
-
public static final byte[] decode(char[] code, int from, int len)
code
- from
- start position in codelen
- length of the part
public static final byte[] decode(byte[] code)
decode(final byte[] code, final int from, final int len)
code
-
public static final byte[] decode(byte[] src, int from, int len)
src
- from
- len
-
public static final byte[] decode76(char[] code)
decodeCRLF(code, 0, code.length, 76)
code
-
public static final byte[] decodeCRLF(char[] code, int from, int len, int llen)
code
- from
- len
- the length of datallen
- the line length of this base64 (without CRLF)
public static final byte[] decodeCRLF(char[] code, int from, int len)
ABCDABCD\r\nABCDABCD or even ABCDABCD#####ABCD###ABCD#ABCD.
The array must be multiple of 4 + number of CRLF or illegal characters and the line length may vary.
code
- from
- len
-
public static final byte[] decodeFailSafe(char[] code)
code
-
public static final byte[] decodeFailSafe(char[] code, int from, int len)
code
- from
- len
-
|
Jadex 0.941 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (C) 2002-2005 Lars Braubach, Alexander Pokahr, Andrzej Walczak - University of Hamburg. Use is subject to license terms.