Package org.apache.felix.gogo.command
Class Base64Encoder
- java.lang.Object
-
- org.apache.felix.gogo.command.Base64Encoder
-
public class Base64Encoder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Base64Encoder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
base64Encode(java.lang.String s)
static java.lang.String
encode(byte[] in, int len)
Encode a raw byte array to a Base64 String.static void
encode(java.io.InputStream in, java.io.OutputStream out, int len)
-
-
-
Method Detail
-
base64Encode
public static java.lang.String base64Encode(java.lang.String s) throws java.io.IOException
- Throws:
java.io.IOException
-
encode
public static java.lang.String encode(byte[] in, int len) throws java.io.IOException
Encode a raw byte array to a Base64 String.- Parameters:
in
- Byte array to encode.len
- Length of Base64 lines. 0 means no line breaks.- Throws:
java.io.IOException
-
encode
public static void encode(java.io.InputStream in, java.io.OutputStream out, int len) throws java.io.IOException
- Throws:
java.io.IOException
-
-