|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-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 javax.crypto.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(java.io.InputStream stream, javax.crypto.Cipher cipher) Construct a BlockCipherInputStream around the supplied stream and decrypt output data with the supplied cipher. |
|
BlockCipherInputStream(java.io.InputStream stream, javax.crypto.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 javax.crypto.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(java.io.InputStream stream, javax.crypto.Cipher cipher)
stream
- the stream to read encrypted data tocipher
- the cipher to use to decrypt datapublic BlockCipherInputStream(java.io.InputStream stream, javax.crypto.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 java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] abData) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] abData, int nOffset, int nLength) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public long skip(long lBytes) throws java.io.IOException
skip
in class java.io.FilterInputStream
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.FilterInputStream
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.FilterInputStream
protected int ensureData() throws java.io.IOException
java.io.IOException
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |