/** * Returns an input stream for decoding {@link Base64} encoded byte stream. * * <p> The {@code read} methods of the returned {@code InputStream} will * throw {@code IOException} when reading bytes that cannot be decoded. * * <p> Closing the returned input stream will close the underlying * input stream. * * @param is * the input stream * * @return the input stream for decoding the specified Base64 encoded * byte stream */ public InputStream wrap(InputStream is) { the(is).shouldNotBeNull(); return new DecInputStream(is, isURL ? fromBase64URL : fromBase64, isMIME); }
@Override public int read() throws IOException { return read(sbBuf, 0, 1) == -1 ? -1 : sbBuf[0] & 0xff; }
/** * Returns an input stream for decoding {@link Base64} encoded byte stream. * * <p> The {@code read} methods of the returned {@code InputStream} will * throw {@code IOException} when reading bytes that cannot be decoded. * * <p> Closing the returned input stream will close the underlying * input stream. * * @param is * the input stream * * @return the input stream for decoding the specified Base64 encoded * byte stream */ public InputStream wrap(InputStream is) { the(is).shouldNotBeNull(); return new DecInputStream(is, isURL ? fromBase64URL : fromBase64, isMIME); }
@Override public int read() throws IOException { return read(sbBuf, 0, 1) == -1 ? -1 : sbBuf[0] & 0xff; }
/** * Returns an input stream for decoding {@link Base64} encoded byte stream. * * <p> The {@code read} methods of the returned {@code InputStream} will * throw {@code IOException} when reading bytes that cannot be decoded. * * <p> Closing the returned input stream will close the underlying * input stream. * * @param is * the input stream * * @return the input stream for decoding the specified Base64 encoded * byte stream */ public InputStream wrap(InputStream is) { the(is).shouldNotBeNull(); return new DecInputStream(is, isURL ? fromBase64URL : fromBase64, isMIME); }
@Override public int read() throws IOException { return read(sbBuf, 0, 1) == -1 ? -1 : sbBuf[0] & 0xff; }