public class SignedInputStream
extends java.io.InputStream
| Modifier and Type | Field and Description |
|---|---|
static int |
STREAM_TYPE_PK |
| Constructor and Description |
|---|
SignedInputStream(java.security.PublicKey sourceKey,
java.io.InputStream in)
Create a stream that can verify the data read from the stream in
blocks.
|
| Modifier and Type | Method and Description |
|---|---|
int |
read()
Read a byte from the stream.
|
boolean |
verifyBlock()
Reads a signature from the stream and verifies the bytes read since
the last verification based on that signature.
|
public static final int STREAM_TYPE_PK
public SignedInputStream(java.security.PublicKey sourceKey,
java.io.InputStream in)
throws java.lang.Exception
java.lang.Exceptionpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic boolean verifyBlock()
throws java.io.IOException,
java.security.SignatureException
java.io.IOExceptionjava.security.SignatureException