default Path writeFile(Path path, Class klass, String resource) {
        try (InputStream inputStream = klass.getResourceAsStream(resource)) {
            return writeFile(path, inputStream);
        } catch (IOException e) {
            throw new SmithyBuildException("Error loading class resource from " + resource + ": " + e.getMessage(), e);
        }
    }
Adds a file to the result using the contents of a resource loaded by
calling {@link Class#getResourceAsStream(String)}.

<p>This method should be preferred when writing class resources to the manifest
since it handles closing the created {@code InputStream} and avoids
tripping up tools like SpotBugs.

@param path Relative path to the file to create.
@param klass Class to load the resource from.
@param resource Path to the resource to load.
@return Returns the resolved path.
smithy-build/src/main/java/software/amazon/smithy/build/FileManifest.java