code: public boolean isValid() {
      validConfig = true;
      setMinBlockSize(minBlockSize);
      setMaxBlockSize(maxBlockSize);
      validConfig &= (minBlockSize <= maxBlockSize);
      validConfig &= setChannelCount(channelCount);
      validConfig &= setSampleRate(sampleRate);
      validConfig &= setBitsPerSample(bitsPerSample);
      return validConfig;
    }
docs: Test if the current configuration is valid. While most set methods will
  ensure the values are in a valid range before setting them, some
  settings(such as number of channels), cannot be guessed. This method may
  alter current values to make them valid if possible.
  @return true if configuration defines a valid FLAC stream, false othwerise.