de.uplanet.util.base64
Class Base64InputStream

java.lang.Object
  extended by java.io.InputStream
      extended by de.uplanet.util.base64.Base64InputStream
All Implemented Interfaces:
java.io.Closeable

@Scriptable
public final class Base64InputStream
extends java.io.InputStream

Base64 encoding as described in RFC 2045 section 6.8.

Version:
$Revision: 55004 $
See Also:
Base64OutputStream

Constructor Summary
Base64InputStream(java.io.Reader p_in)
          Constructor for Base64InputStream.
 
Method Summary
 void close()
          Close the stream.
 void mark(int p_iReadLimit)
          Throws a java.lang.UnsupportedOperationException, since this class does not support the mark method.
 boolean markSupported()
          Tests if this input stream supports the mark and reset methods, which it does not.
 int read()
           
 int read(byte[] p_byte)
           
 int read(byte[] p_buf, int p_iOffs, int p_iLen)
           
 void reset()
          Throws a java.lang.UnsupportedOperationException, since this class does not support the reset method.
 long skip(long p_iLen)
          Skips over and discards p_iLen bytes of data from this decoding stream.
 
Methods inherited from class java.io.InputStream
available
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64InputStream

public Base64InputStream(java.io.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 java.io.IOException
Specified by:
read in class java.io.InputStream
Returns:
Reads the next byte of data from the input stream.
Throws:
java.io.IOException - If an I/O error occurs.
See Also:
InputStream.read()

read

public int read(byte[] p_byte)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException - If an I/O error occurs.
See Also:
InputStream.read(byte[])

read

public int read(byte[] p_buf,
                int p_iOffs,
                int p_iLen)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException - If an I/O error occurs.
See Also:
InputStream.read(byte[], int, int)

skip

public long skip(long p_iLen)
          throws java.io.IOException
Skips over and discards p_iLen bytes of data from this decoding stream.

Overrides:
skip in class java.io.InputStream
Parameters:
p_iLen - Number of Bytes to skip.
Returns:
The number of bytes actually skipped.
Throws:
java.io.IOException
See Also:
InputStream.skip(long)

markSupported

public boolean markSupported()
Tests if this input stream supports the mark and reset methods, which it does not.

Overrides:
markSupported in class java.io.InputStream
Returns:
false, since this class does not support the mark and reset methods.
See Also:
InputStream.markSupported()

mark

public void mark(int p_iReadLimit)
Throws a java.lang.UnsupportedOperationException, since this class does not support the mark method.

Overrides:
mark in class java.io.InputStream
See Also:
InputStream.mark(int)

reset

public void reset()
           throws java.io.IOException
Throws a java.lang.UnsupportedOperationException, since this class does not support the reset method.

Overrides:
reset in class java.io.InputStream
Throws:
java.io.IOException - If an I/O error occurs.
See Also:
InputStream.reset()

close

public void close()
           throws java.io.IOException
Close the stream.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException
See Also:
InputStream.close()


Last updated: 2011-08-11 10-04
Copyright © 2000-2011 United Planet. All Rights Reserved.