Name

CipherInputStream

Synopsis

This class is an input stream that uses a Cipher object to encrypt or decrypt the bytes it reads from another stream. You must initialize the Cipher object before passing it to the CipherInputStream( ) constructor.

javax.crypto.CipherInputStream

Figure 17-2. javax.crypto.CipherInputStream

public class CipherInputStream extends java.io.FilterInputStream {
// Public Constructors
     public CipherInputStream(java.io.InputStream is, Cipher c);  
// Protected Constructors
     protected CipherInputStream(java.io.InputStream is);  
// Public Methods Overriding FilterInputStream
     public int available( ) throws java.io.IOException;  
     public void close( ) throws java.io.IOException;  
     public boolean markSupported( );                                     constant
     public int read( ) throws java.io.IOException;  
     public int read(byte[ ] b) throws java.io.IOException;  
     public int read(byte[ ] b, int off, int len) throws java.io.IOException;  
     public long skip(long n) throws java.io.IOException;  
}

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.