Class cryptix.pgp.PacketByteArray
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptix.pgp.PacketByteArray

java.lang.Object
   |
   +----cryptix.pgp.PacketByteArray

public class PacketByteArray
extends Object
A PacketByteArray is a sequence of PGP packets stored as an array of bytes. This class abstracts that idea, making it possible to specify that a class which requires packets as input won't accept just any old byte array, but only byte arrays which contain packets. In can also do syntax checking, and extract information about the packets therein.
Author:
Jill Baker

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


Variable Index

 o data
 o offsetVector

Constructor Index

 o PacketByteArray(byte[])
 o PacketByteArray(PacketInputStream)

Method Index

 o add(PacketByteArray)
Concatenate another PacketByteArray to this one
 o getPacketLength(int)
 o getPacketOffset(int)
 o getPacketType(int)
 o numPackets()
 o toByteArray()
 o toPacketInputStream()
 o toString()

Variables

 o data
  protected byte data[]
 o offsetVector
  protected Vector offsetVector

Constructors

 o PacketByteArray
  public PacketByteArray(byte buffer[]) throws FormatException
 o PacketByteArray
  public PacketByteArray(PacketInputStream in) throws FormatException, IOException

Methods

 o numPackets
  public int numPackets()
 o getPacketOffset
  public int getPacketOffset(int packetNum)
 o getPacketLength
  public int getPacketLength(int packetNum)
 o getPacketType
  public int getPacketType(int packetNum)
 o toByteArray
  public byte[] toByteArray()
 o toString
  public String toString()
Overrides:
toString in class Object
 o toPacketInputStream
  public PacketInputStream toPacketInputStream()
 o add
  public void add(PacketByteArray suffix) throws FormatException
Concatenate another PacketByteArray to this one

All Packages  Class Hierarchy  This Package  Previous  Next  Index