Base64InputStream

  • Base64InputStream is a subclass of FilterInputStream that decodes Base64-encoded data read from another input stream.

  • It provides methods for reading, skipping, marking, and resetting the stream, similar to other input streams.

  • The constructor takes an existing InputStream and flags to control the decoding process using Base64 constants.

  • Base64InputStream handles the decoding transparently, allowing you to read the decoded data directly.

  • Common input stream operations like read(), available(), close(), mark(), reset(), and skip() are supported.

public class Base64InputStream extends FilterInputStream

An InputStream that does Base64 decoding on the data read through it.

Inherited Field Summary

Public Constructor Summary

Base64InputStream(InputStream in, int flags)
An InputStream that performs Base64 decoding on the data read from the wrapped stream.

Public Method Summary

int
void
close()
void
mark(int readlimit)
boolean
int
read()
int
read(byte[] b, int off, int len)
void
reset()
long
skip(long n)

Inherited Method Summary

Public Constructors

public Base64InputStream (InputStream in, int flags)

An InputStream that performs Base64 decoding on the data read from the wrapped stream.

Parameters
in the InputStream to read the source data from
flags bit flags for controlling the decoder; see the constants in Base64

Public Methods

public int available ()

public void close ()

Throws
IOException

public void mark (int readlimit)

Parameters
readlimit

public boolean markSupported ()

public int read ()

Throws
IOException

public int read (byte[] b, int off, int len)

Parameters
b
off
len
Throws
IOException

public void reset ()

public long skip (long n)

Parameters
n
Throws
IOException