| 
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.io.InputStream
rice.p2p.util.EncryptedInputStream
| Field Summary | |
protected  byte[] | 
buffer
DESCRIBE THE FIELD  | 
protected  int | 
bufferLength
DESCRIBE THE FIELD  | 
protected  byte[] | 
key
DESCRIBE THE FIELD  | 
protected  java.security.PrivateKey | 
privateKey
DESCRIBE THE FIELD  | 
protected  java.io.DataInputStream | 
stream
DESCRIBE THE FIELD  | 
| Constructor Summary | |
EncryptedInputStream(java.security.PrivateKey privateKey,
                     java.io.InputStream stream)
Builds an encrypted inputstream given a private key to decrypt thing under  | 
|
| Method Summary | |
 int | 
available()
Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.  | 
 void | 
close()
Closes this input stream and releases any system resources associated with the stream.  | 
 int | 
read()
Reads the next byte of data from the input stream.  | 
 int | 
read(byte[] b,
     int off,
     int len)
Reads up to len bytes of data from the input stream into an
 array of bytes. | 
protected  void | 
readBuffer()
Internal method which reads in the next chunk of buffered data  | 
| Methods inherited from class java.io.InputStream | 
mark, markSupported, read, reset, skip | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
protected java.security.PrivateKey privateKey
protected byte[] key
protected java.io.DataInputStream stream
protected byte[] buffer
protected int bufferLength
| Constructor Detail | 
public EncryptedInputStream(java.security.PrivateKey privateKey,
                            java.io.InputStream stream)
                     throws java.io.IOException
stream - The underlying streamprivateKey - DESCRIBE THE PARAMETER
java.io.IOException - DESCRIBE THE EXCEPTION| Method Detail | 
public int read()
         throws java.io.IOException
-1 if the end of the stream
      is reached.
java.io.IOException - DESCRIBE THE EXCEPTION
public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
len bytes of data from the input stream into an
 array of bytes. An attempt is made to read as many as len
 bytes, but a smaller number may be read, possibly zero. The number of bytes
 actually read is returned as an integer.
b - the buffer into which the data is read.off - the start offset in array b at which the data is
      written.len - the maximum number of bytes to read.
-1
      if there is no more data because the end of the stream has been
      reached.
java.io.IOException - DESCRIBE THE EXCEPTION
protected void readBuffer()
                   throws java.io.IOException
java.io.IOException - DESCRIBE THE EXCEPTION
public int available()
              throws java.io.IOException
java.io.IOException - if an I/O error occurs.
public void close()
           throws java.io.IOException
java.io.IOException - if an I/O error occurs.
  | 
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||