code: private int loadNextByteInBuffer() throws IOException {
      final int value = this.readByteFromStream();
      if (value < 0) {
        return value;
      }
  
      this.bitBuffer = value;
      this.bitsInBuffer = 8;
  
      return value;
    }
docs: Read the next stream byte into bit buffer.
  
  @return the read byte or -1 if the endo of stream has been reached.
  @throws IOException it will be thrown for transport errors