code: public EncodedElement getData(EncodedElement dataEle) {
      //EncodedElement dataEle = new EncodedElement(_totalBits/8+1,_offset);
      int startSize = dataEle.getTotalBits();
      int unencSampleSize = _frameSampleSize;
      //write headers
      int encodedType = 1<<3 | _order;
      dataEle.addInt(0, 1);
      dataEle.addInt(encodedType, 6);
      dataEle.addInt(0, 1);
      if(_order > 0) {
        dataEle.packInt(_samples, unencSampleSize, _start, _skip, _order);
      }
  
      //send best data to rice encoder
      int paramSize = (lowOrderBits[_order] > 14) ? 5:4;
      boolean fiveBitParam = (paramSize < 5) ? false:true;
      RiceEncoder.beginResidual(fiveBitParam, (byte)0, dataEle);
      /*for(int i = 0; i < errorCount; i++) {
          int error = errors[errorOffset+i*errorStep];
          if(error >= 32767 || error <= -32767)
              System.err.println("Error Bound issue?: " + error);
      }*/
      rice.encodeRicePartition(_errors, _errorOffset, _errorStep,
          _errorCount, dataEle, lowOrderBits[_order], fiveBitParam);
  
      this.lastEncodedSize = dataEle.getTotalBits()-startSize;
      if(DEBUG_LEV > 0)
        System.err.println("Subframe_Fixed::encodeSamples(...): End");
      return dataEle;
    }
docs: Get the data from the last encode attempt. Data is returned in an
  EncodedElement, properly packed at the bit-level to be added directly to
  a FLAC stream.
  
  @return EncodedElement containing encoded subframe