Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document expected InputStream handling and update all example code to match #47

Open
anjackson opened this issue Apr 17, 2024 · 0 comments
Assignees

Comments

@anjackson
Copy link
Member

anjackson commented Apr 17, 2024

As raised via #46 the documentation does not make it clear that the caller is assumed to be responsible for closing any InputStreams that they open and pass to Nanite. The provided examples are problematic because they don't do this properly and rely on the JVM closing things when it shuts down.

Note that, if possible, users should always use the File-based version if they can. The InputStream version is intended for cases where there isn't a filesystem, and may well blow up on large files in some cases.

@anjackson anjackson self-assigned this Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant