- * optionally compressed with GZIP
- *
- * @throws IOException
- * in case of I/O errors
- */
- public static byte[] unbase64(String data, boolean zip) throws IOException {
- return Base64
- .decode(data, zip ? Base64.NO_OPTIONS : Base64.DONT_GUNZIP);
- }
-
- /**
- * Unconvert the given data from Base64 format back to a raw array of bytes.
- *
- * @param data
- * the data to unconvert
- * @param zip
- * TRUE to also uncompress the data from a GZIP format; take care
- * about this flag, as it could easily cause errors in the
- * returned content or an {@link IOException}
- *
- * @return the raw data represented by the given Base64 {@link String}
- *
- * @throws IOException
- * in case of I/O errors
- */
- @Deprecated
- public static OutputStream unbase64(OutputStream data, boolean zip)
- throws IOException {
- OutputStream out = new Base64OutputStream(data, false);
-
-
- if (zip) {
- out = new java.util.zip.GZIPOutputStream(out);
- }
-
- return out;
- }
-
- /**
- * Unconvert the given data from Base64 format back to a raw array of bytes.
- *
- * @param data
- * the data to unconvert
- * @param zip
- * TRUE to also uncompress the data from a GZIP format; take care
- * about this flag, as it could easily cause errors in the
- * returned content or an {@link IOException}
- *
- * @return the raw data represented by the given Base64 {@link String}