Package net.sf.jasperreports.util
Class Base64Util
- java.lang.Object
-
- net.sf.jasperreports.util.Base64Util
-
public class Base64Util extends Object
Utility class to decode Base64 encoded input stream to output stream or to Base64 encode input stream to output stream- Author:
- Sanda Zaharia (shertage@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static Integer
DEFAULT_LINE_LENGTH
static byte[]
DEFAULT_LINE_SEPARATOR
-
Constructor Summary
Constructors Constructor Description Base64Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
decode(InputStream in, OutputStream out)
Decode an input stream and write processed data to an output streamstatic byte[]
decode(String data)
static String
encode(byte[] data)
static String
encode(byte[] data, boolean multiLineOutput)
static void
encode(InputStream in, OutputStream out)
Encode an input stream and write processed data to an output streamstatic void
encode(InputStream in, OutputStream out, boolean multiLineOutput)
Encode an input stream and write processed data to an output stream
-
-
-
Field Detail
-
DEFAULT_LINE_LENGTH
public static final Integer DEFAULT_LINE_LENGTH
-
DEFAULT_LINE_SEPARATOR
public static final byte[] DEFAULT_LINE_SEPARATOR
-
-
Method Detail
-
decode
public static void decode(InputStream in, OutputStream out) throws IOException
Decode an input stream and write processed data to an output stream- Parameters:
in
- the input stream to be decodedout
- the output stream to write the decoded data- Throws:
IOException
-
decode
public static byte[] decode(String data) throws IOException
- Throws:
IOException
-
encode
public static void encode(InputStream in, OutputStream out) throws IOException
Encode an input stream and write processed data to an output stream- Parameters:
in
- the input stream to be encodedout
- the output stream to write the encoded data- Throws:
IOException
-
encode
public static void encode(InputStream in, OutputStream out, boolean multiLineOutput) throws IOException
Encode an input stream and write processed data to an output stream- Parameters:
in
- the input stream to be encodedout
- the output stream to write the encoded datamultiLineOutput
- specifies whether the output should be formatted into multiple rows using a line separator- Throws:
IOException
-
encode
public static String encode(byte[] data, boolean multiLineOutput)
-
encode
public static String encode(byte[] data)
-
-