Class BERCharacterString

    • Field Detail

      • m_value

        protected java.lang.String m_value
        Internal variables
    • Constructor Detail

      • BERCharacterString

        public BERCharacterString()
        Constructs a character string element containing a buffer.
      • BERCharacterString

        public BERCharacterString​(java.lang.String string)
        Constructs a character string element containing buffer.
        Parameters:
        string - a string value
      • BERCharacterString

        public BERCharacterString​(byte[] buffer)
        Constructs a character string element from a byte array.
        Parameters:
        buffer - buffer containing UTF8 data
      • BERCharacterString

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

        public BERCharacterString​(java.io.InputStream stream,
                                  int[] bytes_read)
                           throws java.io.IOException
        Constructs a character string element from an input stream (for primitive encoding)
        Parameters:
        stream - source
        bytes_read - array of 1 int, incremented by number of bytes read
        Throws:
        java.io.IOException - failed to construct
    • Method Detail

      • write

        public void write​(java.io.OutputStream stream)
                   throws java.io.IOException
        Writes BER to stream.
        Specified by:
        write in class BERElement
        Parameters:
        stream - output stream
        Throws:
        java.io.IOException
      • getValue

        public java.lang.String getValue()
        Gets the element value.
      • getType

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

        public abstract java.lang.String toString()
        Gets the string representation.
        Specified by:
        toString in class BERElement
        Returns:
        string representation.