/** * Wraps an output stream for encoding byte data using the {@link Base64} * encoding scheme. * * <p> It is recommended to promptly close the returned output stream after * use, during which it will flush all possible leftover bytes to the underlying * output stream. Closing the returned output stream will close the underlying * output stream. * * @param os * the output stream. * @return the output stream for encoding the byte data into the * specified Base64 encoded format */ public OutputStream wrap(OutputStream os) { the(os).shouldNotBeNull(); return new EncOutputStream(os, isURL ? toBase64URL : toBase64, newline, linemax, doPadding); }
/** * Wraps an output stream for encoding byte data using the {@link Base64} * encoding scheme. * * <p> It is recommended to promptly close the returned output stream after * use, during which it will flush all possible leftover bytes to the underlying * output stream. Closing the returned output stream will close the underlying * output stream. * * @param os * the output stream. * @return the output stream for encoding the byte data into the * specified Base64 encoded format */ public OutputStream wrap(OutputStream os) { the(os).shouldNotBeNull(); return new EncOutputStream(os, isURL ? toBase64URL : toBase64, newline, linemax, doPadding); }
/** * Wraps an output stream for encoding byte data using the {@link Base64} * encoding scheme. * * <p> It is recommended to promptly close the returned output stream after * use, during which it will flush all possible leftover bytes to the underlying * output stream. Closing the returned output stream will close the underlying * output stream. * * @param os * the output stream. * @return the output stream for encoding the byte data into the * specified Base64 encoded format */ public OutputStream wrap(OutputStream os) { the(os).shouldNotBeNull(); return new EncOutputStream(os, isURL ? toBase64URL : toBase64, newline, linemax, doPadding); }