Package de.uplanet.util.base64
Class Base64InputStream
- java.lang.Object
-
- java.io.InputStream
-
- de.uplanet.util.base64.Base64InputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
@Scriptable public final class Base64InputStream extends InputStream
Base64 encoding as described in RFC 2045 section 6.8.- See Also:
Base64OutputStream
-
-
Constructor Summary
Constructors Constructor Description Base64InputStream(Reader p_in)Constructor for Base64InputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the stream.voidmark(int p_iReadLimit)Throws ajava.lang.UnsupportedOperationException, since this class does not support themarkmethod.booleanmarkSupported()Tests if this input stream supports themarkandresetmethods, which it does not.intread()Reads the next byte of data from the input stream.intread(byte[] p_byte)intread(byte[] p_buf, int p_iOffs, int p_iLen)voidreset()Throws ajava.lang.UnsupportedOperationException, since this class does not support theresetmethod.longskip(long p_iLen)Skips over and discardsp_iLenbytes of data from this decoding stream.-
Methods inherited from class java.io.InputStream
available, nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
Base64InputStream
public Base64InputStream(Reader p_in)
Constructor for Base64InputStream. Creates a new base64 input stream.- Parameters:
p_in- The underlying input stream.
-
-
Method Detail
-
read
public int read() throws IOExceptionReads the next byte of data from the input stream.- Specified by:
readin classInputStream- Returns:
- The byte read.
- Throws:
IOException- If an I/O error occurs.
-
read
public int read(byte[] p_byte) throws IOException- Overrides:
readin classInputStream- Throws:
IOException- If an I/O error occurs.
-
read
public int read(byte[] p_buf, int p_iOffs, int p_iLen) throws IOException- Overrides:
readin classInputStream- Throws:
IOException- If an I/O error occurs.
-
skip
public long skip(long p_iLen) throws IOExceptionSkips over and discardsp_iLenbytes of data from this decoding stream.- Overrides:
skipin classInputStream- Parameters:
p_iLen- Number of Bytes to skip.- Returns:
- The number of bytes actually skipped.
- Throws:
IOException
-
markSupported
public boolean markSupported()
Tests if this input stream supports themarkandresetmethods, which it does not.- Overrides:
markSupportedin classInputStream- Returns:
false, since this class does not support themarkandresetmethods.
-
mark
public void mark(int p_iReadLimit)
Throws ajava.lang.UnsupportedOperationException, since this class does not support themarkmethod.- Overrides:
markin classInputStream
-
reset
public void reset() throws IOExceptionThrows ajava.lang.UnsupportedOperationException, since this class does not support theresetmethod.- Overrides:
resetin classInputStream- Throws:
IOException- If an I/O error occurs.
-
close
public void close() throws IOExceptionClose the stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
-