List of usage examples for org.eclipse.jgit.util TemporaryBuffer.Heap writeTo
public void writeTo(OutputStream os, ProgressMonitor pm) throws IOException
From source file:com.google.gerrit.httpd.restapi.RestApiServlet.java
License:Apache License
@SuppressWarnings("resource") private static BinaryResult asBinaryResult(final TemporaryBuffer.Heap buf) { return new BinaryResult() { @Override//from w w w. java2s. c om public void writeTo(OutputStream os) throws IOException { buf.writeTo(os, null); } }.setContentLength(buf.length()); }