Bouncy Castle Cryptography Library 1.81

org.bouncycastle.bcpg.test
Class PacketDumpUtil

java.lang.Object
  extended byorg.bouncycastle.bcpg.test.PacketDumpUtil

public class PacketDumpUtil
extends java.lang.Object


Constructor Summary
PacketDumpUtil()
           
 
Method Summary
static java.lang.String hexdump(ContainedPacket packet)
          Return a formatted hex dump of the packet encoding of the given packet.
static java.lang.String hexdump(int startIndent, ContainedPacket packet)
          Return a formatted hex dump of the packet encoding of the given packet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PacketDumpUtil

public PacketDumpUtil()
Method Detail

hexdump

public static java.lang.String hexdump(ContainedPacket packet)
                                throws java.io.IOException
Return a formatted hex dump of the packet encoding of the given packet.

Parameters:
packet - packet
Returns:
formatted hex dump
Throws:
java.io.IOException - if an exception happens during packet encoding

hexdump

public static java.lang.String hexdump(int startIndent,
                                       ContainedPacket packet)
                                throws java.io.IOException
Return a formatted hex dump of the packet encoding of the given packet. If startIndent is non-zero, the hex dump is shifted right by the startIndent octets.

Parameters:
startIndent - shift the encodings octet stream by a number of bytes
packet - packet
Returns:
formatted hex dump
Throws:
java.io.IOException - if an exception happens during packet encoding

Bouncy Castle Cryptography Library 1.81