Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rice.p2p.util
Class EncryptedOutputStream

    java.lang.Object
      java.io.OutputStream
          rice.p2p.util.EncryptedOutputStream

public class EncryptedOutputStream
extends java.io.OutputStream

Version:
  $Id: EncryptedOutputStream.java 2605 2005-06-24 22:49:20Z jeffh $
Author:
  Alan Mislove

Field Summary
`protected byte[]` | `buffer` DESCRIBE THE FIELD
`int` | `BUFFER_SIZE` DESCRIBE THE FIELD
`protected int` | `bufferLength` DESCRIBE THE FIELD
`protected byte[]` | `key` DESCRIBE THE FIELD
`protected java.security.PublicKey` | `publicKey` DESCRIBE THE FIELD
`protected java.io.DataOutputStream` | `stream` DESCRIBE THE FIELD

Constructor Summary
`EncryptedOutputStream(java.security.PublicKey publicKey, java.io.OutputStream stream, int bufferSize)` Builds an encrypted outputstream given a public key to encrypt thing under

Method Summary
`void` | `close()` Closes this output stream and releases any system resources associated with this stream.
`void` | `flush()` Flushes this output stream and forces any buffered output bytes to be written out.
`void` | `write(byte[] b, int off, int len)` Writes the given bytes to the output
`void` | `write(int b)` Writes the specified byte to this output stream.
`protected void` | `writeBuffer()` Internal method which writes out the buffered data

Methods inherited from class java.io.OutputStream
`write`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### BUFFER_SIZE

    public final int BUFFER_SIZE

  DESCRIBE THE FIELD

### publicKey

    protected java.security.PublicKey publicKey

  DESCRIBE THE FIELD

### key

    protected byte[] key

  DESCRIBE THE FIELD

### stream

    protected java.io.DataOutputStream stream

  DESCRIBE THE FIELD

### buffer

    protected byte[] buffer

  DESCRIBE THE FIELD

### bufferLength

    protected int bufferLength

  DESCRIBE THE FIELD

Constructor Detail

### EncryptedOutputStream

    public EncryptedOutputStream(java.security.PublicKey publicKey,
                                 java.io.OutputStream stream,
                                 int bufferSize)
                          throws java.io.IOException

  Builds an encrypted outputstream given a public key to encrypt thing under

Parameters:
  `stream` - The underlying stream
  `publicKey` - DESCRIBE THE PARAMETER
  `bufferSize` - DESCRIBE THE PARAMETER
Throws:
  `java.io.IOException` - DESCRIBE THE EXCEPTION

Method Detail

### write

    public void write(int b)
               throws java.io.IOException

  Writes the specified byte to this output stream.

  Parameters:
    `b` - the byte
  Throws:
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### write

    public void write(byte[] b,
                      int off,
                      int len)
               throws java.io.IOException

  Writes the given bytes to the output

  Parameters:
    `b` - the data.
    `off` - the start offset in the data.
    `len` - the number of bytes to write.
  Throws:
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### writeBuffer

    protected void writeBuffer()
                        throws java.io.IOException

  Internal method which writes out the buffered data

  Throws:
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### flush

    public void flush()
               throws java.io.IOException

  Flushes this output stream and forces any buffered output bytes to be written out.

  Throws:
    `java.io.IOException` - DESCRIBE THE EXCEPTION

### close

    public void close()
               throws java.io.IOException

  Closes this output stream and releases any system resources associated with this stream.

  Throws:
    `java.io.IOException` - DESCRIBE THE EXCEPTION

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.