Class PacketDumpUtil

java.lang.Object
org.bouncycastle.bcpg.test.PacketDumpUtil

public class PacketDumpUtil extends Object
  • Constructor Details

    • PacketDumpUtil

      public PacketDumpUtil()
  • Method Details

    • hexdump

      public static String hexdump(ContainedPacket packet) throws IOException
      Return a formatted hex dump of the packet encoding of the given packet.
      Parameters:
      packet - packet
      Returns:
      formatted hex dump
      Throws:
      IOException - if an exception happens during packet encoding
    • hexdump

      public static String hexdump(int startIndent, ContainedPacket packet) throws 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:
      IOException - if an exception happens during packet encoding