Base64OutputStream

  • Base64OutputStream encodes data written to it in Base64 and writes the encoded data to another OutputStream.

  • It provides methods for writing individual bytes, byte arrays, and closing the stream.

  • The encoding process is controlled by flags passed to the constructor, referencing the Base64 class constants.

  • Inherits methods from FilterOutputStream, including close, flush, and write.

  • Throws IOException for errors related to writing to the underlying output stream.

public class Base64OutputStream extends FilterOutputStream

An OutputStream that does Base64 encoding on the data written to it, writing the resulting data to another OutputStream.

Inherited Field Summary

Public Constructor Summary

Base64OutputStream(OutputStream out, int flags)
Performs Base64 encoding on the data written to the stream, writing the encoded data to another OutputStream.

Public Method Summary

void
close()
void
write(byte[] b, int off, int len)
void
write(int b)

Inherited Method Summary

Public Constructors

public Base64OutputStream (OutputStream out, int flags)

Performs Base64 encoding on the data written to the stream, writing the encoded data to another OutputStream.

Parameters
out the OutputStream to write the encoded data to
flags bit flags for controlling the encoder; see the constants in Base64

Public Methods

public void close ()

Throws
IOException

public void write (byte[] b, int off, int len)

Parameters
b
off
len
Throws
IOException

public void write (int b)

Parameters
b
Throws
IOException