private static String extractAscii(final String asciiParameters, final int pos, final int len) {
        if (asciiParameters != null && len > 0 && pos + len <= asciiParameters.length()) {
            return asciiParameters.substring(pos, pos + len - 1);
        }
        return "~~~";
    }
Extract a sub-string from the ASCII parameters. The ASCII parameters include a vertical-bar symbol to act as a separator between strings. This method
includes some safety-checking logic which should not be necessary except in the case of a badly formatted GeoTIFF file.

@param asciiParameters the content of TIFF Tag ID=34737.
@param pos             the position of the sub-string within the content
@param len             the length of the sub-string.
@return a valid string.
src/test/java/org/apache/commons/imaging/examples/tiff/ReadTagsAndImages.java