Class BinaryDecoder


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

      Constructors 
      Constructor Description
      BinaryDecoder​(java.io.BufferedReader reader)  
      BinaryDecoder​(java.io.BufferedReader reader, int bitsPerCharacter, int baseCharacter)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int initialize​(int dataBitCount)  
      int read()  
      static byte[] toBytes​(java.lang.String encodedBytes, int dataBitCount)
      Convenience method to directly decode a String-encoded byte array.
      static int[] toInts​(java.lang.String encodedBytes, int dataBitCount)
      Convenience method to directly decode a String-encoded int array.
      • Methods inherited from class java.lang.Object

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

      • BinaryDecoder

        public BinaryDecoder​(java.io.BufferedReader reader)
      • BinaryDecoder

        public BinaryDecoder​(java.io.BufferedReader reader,
                             int bitsPerCharacter,
                             int baseCharacter)
    • Method Detail

      • toBytes

        public static byte[] toBytes​(java.lang.String encodedBytes,
                                     int dataBitCount)
        Convenience method to directly decode a String-encoded byte array.
        Parameters:
        encodedBytes -
        dataBitCount - count of bits per byte
        Returns:
      • toInts

        public static int[] toInts​(java.lang.String encodedBytes,
                                   int dataBitCount)
        Convenience method to directly decode a String-encoded int array.
        Parameters:
        encodedBytes -
        dataBitCount - count of bits per byte
        Returns:
      • initialize

        public int initialize​(int dataBitCount)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public int read()
                 throws java.io.IOException
        Throws:
        java.io.IOException