Cleanup renderStreaming to carry less state

The close method only needs the tail of the template.  Rewrite the
closure so only the tail is retained as UTF-8 encoded bytes, allowing
the JVM to free the larger String.

Use try-with-resources to perform the final write.  This ensures that
if the write fails (e.g.  stream is disconnected), the close still
happens, and the risk of a file descriptor leaking is reduced.

Change-Id: Ia694a3457a386fc311c702472f053d47e670a88c
1 file changed
tree: e39565ef47393af3a31ff82af18e85b9fc19571b
  1. .settings/
  2. blame-cache/
  3. Documentation/
  4. gitiles-dev/
  5. gitiles-servlet/
  6. gitiles-war/
  7. lib/
  8. tools/
  9. .gitignore
  10. .mailmap
  11. BUILD
  12. COPYING
  13. fake_pom_deploy.xml
  14. navbar.md
  15. README.md
  16. version.bzl
  17. WORKSPACE
README.md

Gitiles - A simple JGit repository browser

Gitiles is a simple repository browser for Git repositories, built on JGit. Its guiding principle is simplicity: it has no formal access controls, no write access, no fancy Javascript, etc.

Gitiles automatically renders *.md Markdown files into HTML for simplified documentation. Refer to the Markdown documentation for details.

Configuration

Gitiles is configurable in a git-style configuration file named gitiles.config. Refer to the configuration documentation for details.

Bugs

Use the issue tracker at github to file bugs.

Contributing to Gitiles

Please refer to the Developer Guide.