Package org.smallmind.nutsnbolts.http
Class Base64Codec
- java.lang.Object
-
- org.smallmind.nutsnbolts.http.Base64Codec
-
public final class Base64Codec extends Object
-
-
Constructor Summary
Constructors Constructor Description Base64Codec()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]decode(byte[] bytes)static byte[]decode(byte[] bytes, boolean strict)static byte[]decode(byte[] bytes, boolean strict, char char62, char char63)static byte[]decode(byte[] bytes, char char62, char char63)static byte[]decode(ByteArrayInputStream byteInputStream)static byte[]decode(ByteArrayInputStream byteInputStream, boolean strict)static byte[]decode(ByteArrayInputStream byteInputStream, boolean strict, char char62, char char63)static byte[]decode(ByteArrayInputStream byteInputStream, char char62, char char63)static byte[]decode(String encoded)static byte[]decode(String encoded, boolean strict)static byte[]decode(String encoded, boolean strict, char char62, char char63)static byte[]decode(String encoded, char char62, char char63)static Stringencode(byte[] bytes)static Stringencode(byte[] bytes, boolean includePadding)static Stringencode(byte[] bytes, boolean includePadding, char char62, char char63)static Stringencode(byte[] bytes, char char62, char char63)static Stringencode(ByteArrayInputStream byteInputStream, boolean includePadding, char char62, char char63)static Stringencode(ByteArrayInputStream byteInputStream, char char62, char char63)static Stringencode(String original)static Stringencode(String original, boolean includePadding)static Stringencode(String original, boolean includePadding, char char62, char char63)static Stringencode(String original, char char62, char char63)static byte[]urlSafeDecode(byte[] bytes)static byte[]urlSafeDecode(ByteArrayInputStream byteInputStream)static byte[]urlSafeDecode(String encoded)static StringurlSafeEncode(byte[] bytes)static StringurlSafeEncode(ByteArrayInputStream byteInputStream)static StringurlSafeEncode(String original)
-
-
-
Method Detail
-
urlSafeEncode
public static String urlSafeEncode(String original) throws IOException
- Throws:
IOException
-
urlSafeEncode
public static String urlSafeEncode(byte[] bytes) throws IOException
- Throws:
IOException
-
urlSafeEncode
public static String urlSafeEncode(ByteArrayInputStream byteInputStream) throws IOException
- Throws:
IOException
-
encode
public static String encode(String original) throws IOException
- Throws:
IOException
-
encode
public static String encode(String original, boolean includePadding) throws IOException
- Throws:
IOException
-
encode
public static String encode(String original, char char62, char char63) throws IOException
- Throws:
IOException
-
encode
public static String encode(String original, boolean includePadding, char char62, char char63) throws IOException
- Throws:
IOException
-
encode
public static String encode(byte[] bytes) throws IOException
- Throws:
IOException
-
encode
public static String encode(byte[] bytes, boolean includePadding) throws IOException
- Throws:
IOException
-
encode
public static String encode(byte[] bytes, char char62, char char63) throws IOException
- Throws:
IOException
-
encode
public static String encode(byte[] bytes, boolean includePadding, char char62, char char63) throws IOException
- Throws:
IOException
-
encode
public static String encode(ByteArrayInputStream byteInputStream, char char62, char char63) throws IOException
- Throws:
IOException
-
encode
public static String encode(ByteArrayInputStream byteInputStream, boolean includePadding, char char62, char char63) throws IOException
- Throws:
IOException
-
urlSafeDecode
public static byte[] urlSafeDecode(String encoded) throws IOException
- Throws:
IOException
-
urlSafeDecode
public static byte[] urlSafeDecode(byte[] bytes) throws IOException- Throws:
IOException
-
urlSafeDecode
public static byte[] urlSafeDecode(ByteArrayInputStream byteInputStream) throws IOException
- Throws:
IOException
-
decode
public static byte[] decode(String encoded) throws IOException
- Throws:
IOException
-
decode
public static byte[] decode(String encoded, boolean strict) throws IOException
- Throws:
IOException
-
decode
public static byte[] decode(String encoded, char char62, char char63) throws IOException
- Throws:
IOException
-
decode
public static byte[] decode(String encoded, boolean strict, char char62, char char63) throws IOException
- Throws:
IOException
-
decode
public static byte[] decode(byte[] bytes) throws IOException- Throws:
IOException
-
decode
public static byte[] decode(byte[] bytes, boolean strict) throws IOException- Throws:
IOException
-
decode
public static byte[] decode(byte[] bytes, char char62, char char63) throws IOException- Throws:
IOException
-
decode
public static byte[] decode(byte[] bytes, boolean strict, char char62, char char63) throws IOException- Throws:
IOException
-
decode
public static byte[] decode(ByteArrayInputStream byteInputStream) throws IOException
- Throws:
IOException
-
decode
public static byte[] decode(ByteArrayInputStream byteInputStream, boolean strict) throws IOException
- Throws:
IOException
-
decode
public static byte[] decode(ByteArrayInputStream byteInputStream, char char62, char char63) throws IOException
- Throws:
IOException
-
decode
public static byte[] decode(ByteArrayInputStream byteInputStream, boolean strict, char char62, char char63) throws IOException
- Throws:
IOException
-
-