List of usage examples for org.eclipse.jgit.util TemporaryBuffer.Heap length
public long length()
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 . ja v a 2 s . com public void writeTo(OutputStream os) throws IOException { buf.writeTo(os, null); } }.setContentLength(buf.length()); }