code: public boolean setBitsPerSample(int bitsPerSample) {
      boolean result = ((bitsPerSample <= MAX_BITS_PER_SAMPLE) &&
      (bitsPerSample >= MIN_BITS_PER_SAMPLE) );
      this.bitsPerSample = bitsPerSample;
      return result;
    }
docs: Set the bits per sample. Because this is not a value that may be
  guessed and corrected, the value will be set to that given even if it is
  not valid.
  @param bitsPerSample number of bits per sample
  @return true if value given is within the valid range, false otherwise.