Android
javax.crypto
public class

javax.crypto.CipherInputStream

java.lang.Object
java.io.InputStream Closeable
java.io.FilterInputStream
javax.crypto.CipherInputStream

Summary

Fields inherited from class java.io.FilterInputStream

Public Constructors

            CipherInputStream(InputStream is, Cipher c)

Protected Constructors

            CipherInputStream(InputStream is)

Public Methods

          int  available()
Returns a int representing the number of bytes that are available before this FilterInputStream will block.
          void  close()
Close this FilterInputStream.
          boolean  markSupported()
Returns a boolean indicating whether or not this FilterInputStream supports mark() and reset().
          int  read(byte[] b, int off, int len)
Reads at most count bytes from this FilterInputStream and stores them in byte array buffer starting at offset.
          int  read(byte[] b)
Reads bytes from this FilterInputStream and stores them in byte array buffer.
          int  read()
Reads a single byte from this FilterInputStream and returns the result as an int.
          long  skip(long n)
Skips count number of bytes in this InputStream.
Methods inherited from class java.io.FilterInputStream
Methods inherited from class java.io.InputStream
Methods inherited from class java.lang.Object
Methods inherited from interface java.io.Closeable

Details

Public Constructors

public CipherInputStream(InputStream is, Cipher c)

Protected Constructors

protected CipherInputStream(InputStream is)

Public Methods

public int available()

Returns a int representing the number of bytes that are available before this FilterInputStream will block. This method returns the number of bytes available in the target stream.

Returns

  • the number of bytes available before blocking.

Throws

IOException

public void close()

Close this FilterInputStream. This implementation closes the target stream.

Throws

IOException

public boolean markSupported()

Returns a boolean indicating whether or not this FilterInputStream supports mark() and reset(). This implementation returns whether or not the target stream supports marking.

Returns

  • true if mark() and reset() are supported, false otherwise.

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

Reads at most count bytes from this FilterInputStream and stores them in byte array buffer starting at offset. Answer the number of bytes actually read or -1 if no bytes were read and end of stream was encountered. This implementation reads bytes from the target stream.

Parameters

b the byte array in which to store the read bytes.
off the offset in buffer to store the read bytes.
len the maximum number of bytes to store in buffer.

Returns

  • the number of bytes actually read or -1 if end of stream.

Throws

IOException

public int read(byte[] b)

Reads bytes from this FilterInputStream and stores them in byte array buffer. Answer the number of bytes actually read or -1 if no bytes were read and end of stream was encountered. This implementation reads bytes from the target stream.

Parameters

b the byte array in which to store the read bytes.

Returns

  • the number of bytes actually read or -1 if end of stream.

Throws

IOException

public int read()

Reads a single byte from this FilterInputStream and returns the result as an int. The low-order byte is returned or -1 of the end of stream was encountered. This implementation returns a byte from the target stream.

Returns

  • the byte read or -1 if end of stream.

Throws

IOException

public long skip(long n)

Skips count number of bytes in this InputStream. Subsequent read()'s will not return these bytes unless reset() is used. This implementation skips count number of bytes in the target stream.

Parameters

n the number of bytes to skip.

Returns

  • the number of bytes actually skipped.

Throws

IOException
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56