Class cryptix.pgp.PacketInputStream
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() functions to DataInputStream. Also allows ONE packet to be pushed back onto the stream.
Author:
Mike Wynn, Ian Brown, Jill Baker

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


Variable Index

 o din
 o store

Constructor Index

 o PacketInputStream(DataInputStream)
 o PacketInputStream(InputStream)

Method Index

 o markSupported()
 o pushback(Packet)
Push 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
 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 packet streams, which can contain Comments anywhere.
 o pushback
  public synchronized void pushback(Packet p) throws IOException
Push 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