Cryptix OpenPGP

cryptix.message.stream
Class DecodedMessageInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended bycryptix.message.stream.DecodedMessageInputStream

public final class DecodedMessageInputStream
extends java.io.InputStream

A stream that decodes, decrypts and verifies messages

Version:
$Revision: 1.1 $
Author:
Edwin Woudt

Field Summary
static int INTEGRITY_GOOD
           
static int INTEGRITY_NOT_PROTECTED
           
static int INTEGRITY_VIOLATED
           
protected  DecodedMessageInputStreamSpi spi
           
static int VERIFICATION_BAD_SIGNATURE
           
static int VERIFICATION_GOOD_SIGNATURE
           
static int VERIFICATION_NOT_SIGNED
           
 
Constructor Summary
protected DecodedMessageInputStream(DecodedMessageInputStreamSpi spi, java.security.Provider provider, java.lang.String format)
          Create a new DecodedMessageInputStream object containing the given SPI object.
 
Method Summary
 void close()
           
 java.lang.String getFormat()
          Returns the name of the format of this object.
static DecodedMessageInputStream getInstance(java.lang.String format)
          Returns an DecodedMessageInputStream that implements the given format.
static DecodedMessageInputStream getInstance(java.lang.String format, java.security.Provider provider)
          Returns an DecodedMessageInputStream from the given provider that implements the given format.
static DecodedMessageInputStream getInstance(java.lang.String format, java.lang.String provider)
          Returns an DecodedMessageInputStream from the given provider that implements the given format.
 int getIntegrityResult()
           
 java.security.Provider getProvider()
          Returns the provider of this object.
 int getVerificationResult()
           
 void init(java.io.InputStream in, DecryptionKeyCallback dkc, VerificationKeyCallback vkc)
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERIFICATION_NOT_SIGNED

public static final int VERIFICATION_NOT_SIGNED
See Also:
Constant Field Values

VERIFICATION_GOOD_SIGNATURE

public static final int VERIFICATION_GOOD_SIGNATURE
See Also:
Constant Field Values

VERIFICATION_BAD_SIGNATURE

public static final int VERIFICATION_BAD_SIGNATURE
See Also:
Constant Field Values

INTEGRITY_NOT_PROTECTED

public static final int INTEGRITY_NOT_PROTECTED
See Also:
Constant Field Values

INTEGRITY_GOOD

public static final int INTEGRITY_GOOD
See Also:
Constant Field Values

INTEGRITY_VIOLATED

public static final int INTEGRITY_VIOLATED
See Also:
Constant Field Values

spi

protected final DecodedMessageInputStreamSpi spi
Constructor Detail

DecodedMessageInputStream

protected DecodedMessageInputStream(DecodedMessageInputStreamSpi spi,
                                    java.security.Provider provider,
                                    java.lang.String format)
Create a new DecodedMessageInputStream object containing the given SPI object.

Method Detail

getInstance

public static DecodedMessageInputStream getInstance(java.lang.String format)
                                             throws java.security.NoSuchAlgorithmException
Returns an DecodedMessageInputStream that implements the given format.

Throws:
java.security.NoSuchAlgorithmException

getInstance

public static DecodedMessageInputStream getInstance(java.lang.String format,
                                                    java.lang.String provider)
                                             throws java.security.NoSuchAlgorithmException,
                                                    java.security.NoSuchProviderException
Returns an DecodedMessageInputStream from the given provider that implements the given format.

Throws:
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException

getInstance

public static DecodedMessageInputStream getInstance(java.lang.String format,
                                                    java.security.Provider provider)
                                             throws java.security.NoSuchAlgorithmException
Returns an DecodedMessageInputStream from the given provider that implements the given format.

Throws:
java.security.NoSuchAlgorithmException

getProvider

public final java.security.Provider getProvider()
Returns the provider of this object.


getFormat

public final java.lang.String getFormat()
Returns the name of the format of this object.


init

public final void init(java.io.InputStream in,
                       DecryptionKeyCallback dkc,
                       VerificationKeyCallback vkc)
                throws java.lang.IllegalStateException,
                       java.io.IOException,
                       MessageStreamException
Throws:
java.lang.IllegalStateException
java.io.IOException
MessageStreamException

read

public final int read()
               throws java.io.IOException
Throws:
java.io.IOException

read

public final int read(byte[] b,
                      int off,
                      int len)
               throws java.io.IOException
Throws:
java.io.IOException

close

public final void close()
                 throws java.io.IOException
Throws:
java.io.IOException

getVerificationResult

public final int getVerificationResult()
                                throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

getIntegrityResult

public final int getIntegrityResult()
                             throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

Cryptix OpenPGP

Copyright (C) 1999-2003 The Cryptix Foundation Ltd.