Class BERPrintableString

All Implemented Interfaces:
Serializable

public class BERPrintableString extends BERCharacterString
This class is for the PrintableString type.
 ENCODING RULE:
   Primitive Definite length.
   tag = 0x13
   length = (short or long form)
   one or more contents octets
 
Version:
1.0 seeAlso CCITT X.209
See Also:
  • Constructor Details

    • BERPrintableString

      public BERPrintableString(String string)
      Constructs a printable string element containing buffer.
      Parameters:
      string - string value
    • BERPrintableString

      public BERPrintableString(byte[] buffer)
      Constructs a printables tring element from buffer.
      Parameters:
      buffer - byte array value
    • BERPrintableString

      public BERPrintableString(BERTagDecoder decoder, InputStream stream, int[] bytes_read) throws IOException
      Constructs a printable string element from an input stream (for constructed encoding)
      Parameters:
      stream - source
      bytes_read - array of 1 int, incremented by number of bytes read
      Throws:
      IOException - failed to construct
    • BERPrintableString

      public BERPrintableString(InputStream stream, int[] bytes_read) throws IOException
      Constructs a printablestring element from an input stream (for primitive encoding)
      Parameters:
      stream - source
      bytes_read - array of 1 int, incremented by number of bytes read
      Throws:
      IOException - failed to construct
  • Method Details

    • getType

      public int getType()
      Gets the element type.
      Specified by:
      getType in class BERCharacterString
      Returns:
      element type.
    • toString

      public String toString()
      Gets the string representation. Note that it prints out values in decimal form.
      Specified by:
      toString in class BERCharacterString
      Returns:
      string representation of tag.