String getSampleFormatString(final TiffDirectory directory) throws ImagingException {
        final short[] sSampleFmt = directory.getFieldValue(TiffTagConstants.TIFF_TAG_SAMPLE_FORMAT, false);
        if (sSampleFmt == null || sSampleFmt.length == 0) {
            return "Unknown";
        }
        String heterogeneous = "";
        for (int i = 1; i < sSampleFmt.length; i++) {
            if (sSampleFmt[i] != sSampleFmt[0]) {
                heterogeneous = "*";
                break;
            }
        }
        final int test = sSampleFmt[0];
        switch (test) {
        case TiffTagConstants.SAMPLE_FORMAT_VALUE_COMPLEX_INTEGER:
            return "Comp I" + heterogeneous;
        case TiffTagConstants.SAMPLE_FORMAT_VALUE_IEEE_FLOATING_POINT:
            return "Float" + heterogeneous;
        case TiffTagConstants.SAMPLE_FORMAT_VALUE_IEEE_COMPLEX_FLOAT:
            return "Comp F" + heterogeneous;
        case TiffTagConstants.SAMPLE_FORMAT_VALUE_TWOS_COMPLEMENT_SIGNED_INTEGER:
            return "Sgn Int" + heterogeneous;
        case TiffTagConstants.SAMPLE_FORMAT_VALUE_UNSIGNED_INTEGER:
            return "Uns Int" + heterogeneous;
        default:
            return "Unknown" + heterogeneous;
        }
    }
Formats a header allowing space for the maximum length of the file paths in the list. If the comma-separated-value option is set, spaces will be
suppressed and commas introduced as separators.

@param maxPathLen the maximum length of a file path (used if csv option is not set)
@param csv        true if formatting is configured for comma-separated-value files.
@return a valid string.
src/test/java/org/apache/commons/imaging/examples/tiff/SurveyTiffFile.java