public Path createTempFile(Metadata metadata) throws IOException {
        String resourceName = metadata.get(TikaCoreProperties.RESOURCE_NAME_KEY);
        if (StringUtils.isBlank(resourceName)) {
            return createTempFile(StringUtils.EMPTY);
        }
        return createTempFile(FilenameUtils.getSuffixFromPath(resourceName));
    }
Creates a temporary file that will automatically be deleted when
the {@link #close()} method is called, returning its path.

@return Path to created temporary file that will be deleted after closing
@throws IOException
tika-core/src/main/java/org/apache/tika/io/TemporaryResources.java