Class PrettyPrintFormat

java.lang.Object
com.netscape.cmscore.cert.PrettyPrintFormat
All Implemented Interfaces:
IPrettyPrintFormat

public class PrettyPrintFormat extends Object implements IPrettyPrintFormat
This class will display the certificate content in predefined format.
Version:
$Revision$, $Date$
Author:
Andrew Wnuk
  • Constructor Details

    • PrettyPrintFormat

      public PrettyPrintFormat(String separator)
    • PrettyPrintFormat

      public PrettyPrintFormat(String separator, int lineLen)
    • PrettyPrintFormat

      public PrettyPrintFormat(String separator, int lineLen, int indentSize)
  • Method Details

    • indent

      public String indent(int size)
      Provide white space indention stevep - speed improvements. Factor of 10 improvement
      Parameters:
      size - number of white space to be returned
      Returns:
      white spaces
    • toHexString

      public String toHexString(byte[] in, int indentSize, int lineLen, String separator)
      Convert Byte Array to Hex String Format stevep - speedup by factor of 8
      Specified by:
      toHexString in interface IPrettyPrintFormat
      Parameters:
      in - byte array of data to hexify
      indentSize - number of spaces to prepend before each line
      lineLen - number of bytes to output on each line (0 means: put everything on one line
      separator - the first character of this string will be used as the separator between bytes.
      Returns:
      string representation
    • toHexString

      public String toHexString(byte[] in, int indentSize, int lineLen)
      Description copied from interface: IPrettyPrintFormat
      Retrieves a pretty print string of the given byte array.
      Specified by:
      toHexString in interface IPrettyPrintFormat
      Parameters:
      in - byte array
      indentSize - indentation size
      lineLen - length of line
      Returns:
      pretty print string
    • toHexString

      public String toHexString(byte[] in, int indentSize)
      Description copied from interface: IPrettyPrintFormat
      Retrieves a pretty print string of the given byte array.
      Specified by:
      toHexString in interface IPrettyPrintFormat
      Parameters:
      in - byte array
      indentSize - indentation size
      Returns:
      pretty print string
    • toHexString

      public String toHexString(byte[] in)
      Description copied from interface: IPrettyPrintFormat
      Retrieves a pretty print string of the given byte array.
      Specified by:
      toHexString in interface IPrettyPrintFormat
      Parameters:
      in - byte array
      Returns:
      pretty print string