|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.tangosol.net.security.BlockCipherInputStream
public class BlockCipherInputStream
InputStream which supports block ciphers, and data sizes which exceed the Cipher's block size.
Field Summary | |
---|---|
static byte[] |
EMPTY_BYTE_ARRAY Initial value for m_abBlockClear |
protected byte[] |
m_abBlockClear The current block of unencrypted data |
protected byte[] |
m_abBlockEncrypted The current block of encrypted data |
protected Cipher |
m_cipher The Cipher to use to decrypt data |
protected boolean |
m_fEof Marker indicating if the end of the wrapped stream has been reached |
protected int |
m_nBlockIndex The index into the next unread byte of unencrypted data |
protected int |
m_nBlockSize The Cipher's block size |
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
BlockCipherInputStream(InputStream stream, Cipher cipher) Construct a BlockCipherInputStream around the supplied stream and decrypt output data with the supplied cipher. |
|
BlockCipherInputStream(InputStream stream, Cipher cipher, int cbBlock) Construct a BlockCipherInputStream around the supplied stream and decrypt output data with the supplied cipher. |
Method Summary | |
---|---|
int |
available() |
protected int |
ensureData() Ensure that there is some data available for read, blocking on the wrapped stream if necessary. |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] abData) |
int |
read(byte[] abData, int nOffset, int nLength) |
long |
skip(long lBytes) |
Methods inherited from class java.io.FilterInputStream |
---|
close, mark, reset |
Field Detail |
---|
protected Cipher m_cipher
protected int m_nBlockSize
protected byte[] m_abBlockEncrypted
protected byte[] m_abBlockClear
protected int m_nBlockIndex
protected boolean m_fEof
public static final byte[] EMPTY_BYTE_ARRAY
Constructor Detail |
---|
public BlockCipherInputStream(InputStream stream, Cipher cipher)
stream
- the stream to read encrypted data tocipher
- the cipher to use to decrypt datapublic BlockCipherInputStream(InputStream stream, Cipher cipher, int cbBlock)
stream
- the stream to read encrypted data tocipher
- the cipher to use to decrypt datacbBlock
- the size of an encrypted block required by the cipherMethod Detail |
---|
public int read() throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] abData) throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] abData, int nOffset, int nLength) throws IOException
read
in class FilterInputStream
IOException
public long skip(long lBytes) throws IOException
skip
in class FilterInputStream
IOException
public int available() throws IOException
available
in class FilterInputStream
IOException
public boolean markSupported()
markSupported
in class FilterInputStream
protected int ensureData() throws IOException
IOException
|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |