code: public static EncodedElement getStreamInfo(StreamConfiguration sc,
        int minFrameSize, int maxFrameSize, long samplesInStream, byte[] md5Hash) {
      int bytes = getByteSize();
      EncodedElement ele = new EncodedElement(bytes, 0);
      int encodedBitsPerSample = sc.getBitsPerSample()-1;
      ele.addInt(sc.getMinBlockSize(), 16);
      ele.addInt(sc.getMaxBlockSize(), 16);
      ele.addInt(minFrameSize, 24);
      ele.addInt(maxFrameSize, 24);
      ele.addInt(sc.getSampleRate(), 20);
      ele.addInt(sc.getChannelCount()-1, 3);
      ele.addInt(encodedBitsPerSample, 5);
      ele.addLong(samplesInStream, 36);
      for(int i = 0; i < 16; i++) {
        ele.addInt(md5Hash[i], 8);
      }
      return ele;
    }
docs: Create a FLAC StreamInfo metadata block with the given parameters. Because
  of the data stored in a StreamInfo block, this should generally be created
  only after all encoding is done.
  
  @param sc StreamConfiguration used in this FLAC stream.
  @param minFrameSize Size of smallest frame in FLAC stream.
  @param maxFrameSize Size of largest frame in FLAC stream.
  @param samplesInStream Total number of inter-channel audio samples in
  FLAC stream.
  @param md5Hash MD5 hash of the raw audio samples.
  @return EncodedElement containing created StreamInfo block.