cryptix.pgp
Class PacketByteArray
java.lang.Object
|
+--cryptix.pgp.PacketByteArray
- public class PacketByteArray
- extends java.lang.Object
A PacketByteArray is a sequence of PGP packets stored as an array of bytes.
This class abstracts this idea, making it possible to specify that a
class that requires packets as input won't accept just any old
byte array, but only byte arrays that contain packets. It can also do
syntax checking, and extract information about the packets therein.
Copyright © 1995-1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.1.1.1 $
- Since:
- Cryptix 2.2 or earlier
- Author:
- Jill Baker
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
data
protected byte[] data
offsetVector
protected java.util.Vector offsetVector
PacketByteArray
public PacketByteArray(byte[] buffer)
throws FormatException
PacketByteArray
public PacketByteArray(PacketInputStream in)
throws FormatException,
java.io.IOException
numPackets
public int numPackets()
getPacketOffset
public int getPacketOffset(int packetNum)
getPacketLength
public int getPacketLength(int packetNum)
getPacketType
public int getPacketType(int packetNum)
toByteArray
public byte[] toByteArray()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
toPacketInputStream
public PacketInputStream toPacketInputStream()
add
public void add(PacketByteArray suffix)
throws FormatException
- Concatenates another PacketByteArray to this one.