Class BER


  • public class BER
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      BER()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.nio.ByteBuffer appendBuf​(java.nio.ByteBuffer buf, byte tag, byte[] value)  
      static void dump​(java.nio.ByteBuffer buf, Log log)  
      static boolean getBoolean​(java.nio.ByteBuffer buffer)  
      static byte[] getBytes​(java.nio.ByteBuffer buffer)  
      static byte[] getBytes​(java.nio.ByteBuffer buffer, boolean verify)  
      static java.lang.String getDN​(java.nio.ByteBuffer buffer)  
      static int getEnum​(java.nio.ByteBuffer buffer)  
      static java.lang.String getFilterString​(java.nio.ByteBuffer buffer)  
      static java.lang.String getFilterString​(java.nio.ByteBuffer buffer, java.lang.String charset)  
      static int getInteger​(java.nio.ByteBuffer buffer)  
      static int getSeqLen​(java.nio.ByteBuffer buffer)  
      static java.lang.String getString​(java.nio.ByteBuffer buffer)  
      static java.lang.String getString​(java.nio.ByteBuffer buffer, boolean verify)  
      static java.lang.String getString​(java.nio.ByteBuffer buffer, int len)  
      static java.lang.String getString​(java.nio.ByteBuffer buffer, int len, java.lang.String charset)  
      static java.lang.String getString​(java.nio.ByteBuffer buffer, java.lang.String charset)  
      static java.lang.String hex​(int ch, int len)  
      static void putBoolean​(java.nio.ByteBuffer buffer, boolean value)  
      static java.nio.ByteBuffer putBytes​(java.nio.ByteBuffer buffer, byte[] value)  
      static void putEnum​(java.nio.ByteBuffer buffer, int value)  
      static java.nio.ByteBuffer putInteger​(java.nio.ByteBuffer buffer, int value)  
      static byte[] putRawInt​(int value)  
      static void putSeqLen​(java.nio.ByteBuffer buffer, int value)  
      static java.nio.ByteBuffer putString​(java.nio.ByteBuffer buffer, java.lang.String str)  
      static java.nio.ByteBuffer putString​(java.nio.ByteBuffer buffer, java.lang.String value, java.lang.String charsetName)  
      static java.nio.ByteBuffer realloc​(java.nio.ByteBuffer buf, int size)  
      static void verify​(byte a, byte b)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BER

        public BER()
    • Method Detail

      • getBoolean

        public static boolean getBoolean​(java.nio.ByteBuffer buffer)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getFilterString

        public static java.lang.String getFilterString​(java.nio.ByteBuffer buffer)
                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getFilterString

        public static java.lang.String getFilterString​(java.nio.ByteBuffer buffer,
                                                       java.lang.String charset)
                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getDN

        public static java.lang.String getDN​(java.nio.ByteBuffer buffer)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getString

        public static java.lang.String getString​(java.nio.ByteBuffer buffer,
                                                 java.lang.String charset)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getString

        public static java.lang.String getString​(java.nio.ByteBuffer buffer)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getString

        public static java.lang.String getString​(java.nio.ByteBuffer buffer,
                                                 boolean verify)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getString

        public static java.lang.String getString​(java.nio.ByteBuffer buffer,
                                                 int len)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getString

        public static java.lang.String getString​(java.nio.ByteBuffer buffer,
                                                 int len,
                                                 java.lang.String charset)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getInteger

        public static int getInteger​(java.nio.ByteBuffer buffer)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getEnum

        public static int getEnum​(java.nio.ByteBuffer buffer)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getBytes

        public static byte[] getBytes​(java.nio.ByteBuffer buffer)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getBytes

        public static byte[] getBytes​(java.nio.ByteBuffer buffer,
                                      boolean verify)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • putBoolean

        public static void putBoolean​(java.nio.ByteBuffer buffer,
                                      boolean value)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • putEnum

        public static void putEnum​(java.nio.ByteBuffer buffer,
                                   int value)
      • putBytes

        public static java.nio.ByteBuffer putBytes​(java.nio.ByteBuffer buffer,
                                                   byte[] value)
      • putString

        public static java.nio.ByteBuffer putString​(java.nio.ByteBuffer buffer,
                                                    java.lang.String str)
      • putString

        public static java.nio.ByteBuffer putString​(java.nio.ByteBuffer buffer,
                                                    java.lang.String value,
                                                    java.lang.String charsetName)
                                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • putInteger

        public static java.nio.ByteBuffer putInteger​(java.nio.ByteBuffer buffer,
                                                     int value)
      • appendBuf

        public static java.nio.ByteBuffer appendBuf​(java.nio.ByteBuffer buf,
                                                    byte tag,
                                                    byte[] value)
      • realloc

        public static java.nio.ByteBuffer realloc​(java.nio.ByteBuffer buf,
                                                  int size)
      • putRawInt

        public static byte[] putRawInt​(int value)
      • putSeqLen

        public static void putSeqLen​(java.nio.ByteBuffer buffer,
                                     int value)
      • verify

        public static void verify​(byte a,
                                  byte b)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • dump

        public static void dump​(java.nio.ByteBuffer buf,
                                Log log)
      • hex

        public static java.lang.String hex​(int ch,
                                           int len)
      • getSeqLen

        public static int getSeqLen​(java.nio.ByteBuffer buffer)