I am getting error "java.lang.nullpointerexception" in the code
 public int getProcessedData(final byte[] data, final int offset)
  {
    int size = bits.getBufferSize();
   System.arraycopy(bits.getBuffer(), 0, data, offset, size);
    bits.init();
    return size;
  }
 
     
    