All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptix.pgp.PacketInputStream

java.lang.Object
   |
   +----java.io.InputStream
           |
           +----java.io.FilterInputStream
                   |
                   +----java.io.DataInputStream
                           |
                           +----cryptix.pgp.PacketInputStream

public class PacketInputStream
extends DataInputStream
Adds readPacket(), readKeyRingEntry() and readUserIdCertificate() methods to DataInputStream.

Also allows ONE packet to be pushed back onto the stream.


Copyright © 1995-1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.1.1.1 $

Author:
Mike Wynn, Ian Brown, Jill Baker

Variable Index

 o din
 o store
Stores a packet that has been pushed back.

Constructor Index

 o PacketInputStream(DataInputStream)
 o PacketInputStream(InputStream)

Method Index

 o markSupported()
 o pushback(Packet)
Pushes back a packet which has been read onto the stream.
 o readAnyPacket()
Reads any packet, including comment packets.
 o readKeyRingEntry(KeyRingTrust)
Used by KeyRing to load in key certificate and accompanying user IDs and signatures, and KeyServer to decipher keys retrieved from remote keyservers.
 o readPacket()
Reads any packet apart from Comment packets.
 o readUserIdCertificate(KeyRingTrust)

Variables

 o store
 protected Packet store
Stores a packet that has been pushed back.

 o din
 protected DataInputStream din

Constructors

 o PacketInputStream
 public PacketInputStream(InputStream input)
 o PacketInputStream
 public PacketInputStream(DataInputStream input)

Methods

 o readAnyPacket
 public synchronized Packet readAnyPacket() throws IOException
Reads any packet, including comment packets.

 o readPacket
 public synchronized Packet readPacket() throws IOException
Reads any packet apart from Comment packets. This greatly simplifies the processing of packet streams, which can contain Comments anywhere.

 o pushback
 public synchronized void pushback(Packet p) throws IOException
Pushes back a packet which has been read onto the stream. This is essential for parsing multi-packet structures such as a KeyRingEntry, where you don't know how many packets of what type to expect.

 o readKeyRingEntry
 public synchronized KeyRingEntry readKeyRingEntry(KeyRingTrust defaultTrust) throws IOException
Used by KeyRing to load in key certificate and accompanying user IDs and signatures, and KeyServer to decipher keys retrieved from remote keyservers.

 o readUserIdCertificate
 public synchronized UserIdCertificate readUserIdCertificate(KeyRingTrust defaultTrust) throws IOException
 o markSupported
 public boolean markSupported()
Overrides:
markSupported in class FilterInputStream

All Packages  Class Hierarchy  This Package  Previous  Next  Index