public static void decodeBase64ToStream(final String inString, final OutputStream out) throws IOException {
        Base64InputStream in = null;
        try {
            in = new Base64InputStream(new ByteArrayInputStream(inString.getBytes(StandardCharsets.US_ASCII)), Base64.DEFAULT);
            IOUtils.copy(in, out);
        } finally {
            IOUtils.closeQuietly(in);
        }
    }
Decode a base64-encoded string and save the result into a stream.

@param inString the encoded string
@param out      the stream to save the decoded result into
main/src/main/java/cgeo/geocaching/utils/ImageUtils.java