Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.net.security
Class BlockCipherOutputStream

    java.lang.Object
      java.io.OutputStream
          java.io.FilterOutputStream
              com.tangosol.net.security.BlockCipherOutputStream

All Implemented Interfaces:
  java.io.Closeable, java.io.Flushable

    public class BlockCipherOutputStream

extends java.io.FilterOutputStream

InputStream which supports block ciphers, and data sizes which exceed the Cipher's block size.

Author:
  mf 2006.08.08

Field Summary
`protected byte[]` | `m_abBlockClear` The current block of unencrypted data
`protected javax.crypto.Cipher` | `m_cipher` The Encryption Cipher
`protected int` | `m_nBlockIndex` The next available index to write into the unencrypted data block.

Fields inherited from class java.io.FilterOutputStream
`out`

Constructor Summary
`BlockCipherOutputStream(java.io.OutputStream stream, javax.crypto.Cipher cipher)` Construct a BlockCipherOutputStream around the supplied stream and encrypt output data with the supplied cipher.

Method Summary
`void` | `flush()`
`void` | `write(byte[] abData, int nOffset, int nLength)`
`void` | `write(int bData)`
`protected void` | `writeBlock()` Write the current clear block to the wrapped stream.

Methods inherited from class java.io.FilterOutputStream
`close, write`

Field Detail

### m_cipher

    protected javax.crypto.Cipher m_cipher

  The Encryption Cipher

### m_abBlockClear

    protected byte[] m_abBlockClear

  The current block of unencrypted data

### m_nBlockIndex

    protected int m_nBlockIndex

  The next available index to write into the unencrypted data block.

Constructor Detail

### BlockCipherOutputStream

    public BlockCipherOutputStream(java.io.OutputStream stream,
                                   javax.crypto.Cipher cipher)

  Construct a BlockCipherOutputStream around the supplied stream and encrypt output data with the supplied cipher.

  Parameters:
    `stream` - the stream to write encrypted data to
    `cipher` - the cipher to use to encrypt data

Method Detail

### flush

    public void flush()
               throws java.io.IOException

  Specified by:
    `flush` in interface `java.io.Flushable`
  Overrides:
    `flush` in class `java.io.FilterOutputStream`
  Throws:
    `java.io.IOException`

### write

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

  Overrides:
    `write` in class `java.io.FilterOutputStream`
  Throws:
    `java.io.IOException`

### write

    public void write(byte[] abData,
                      int nOffset,
                      int nLength)
               throws java.io.IOException

  Overrides:
    `write` in class `java.io.FilterOutputStream`
  Throws:
    `java.io.IOException`

### writeBlock

    protected void writeBlock()
                       throws java.io.IOException

  Write the current clear block to the wrapped stream.

  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.