entity = new BasicManagedEntity(entity, managedConn, reuse); response.setEntity(entity);
public boolean eofDetected(InputStream wrapped) throws IOException { try { if (attemptReuse && (managedConn != null)) { // there may be some cleanup required, such as // reading trailers after the response body: wrapped.close(); managedConn.markReusable(); } } finally { releaseManagedConnection(); } return false; }
public void releaseConnection() throws IOException { this.consumeContent(); }
@Override public void releaseConnection() throws IOException { ensureConsumed(); }
@Override public void releaseConnection() throws IOException { ensureConsumed(); }
public boolean streamClosed(InputStream wrapped) throws IOException { try { if (attemptReuse && (managedConn != null)) { // this assumes that closing the stream will // consume the remainder of the response body: wrapped.close(); managedConn.markReusable(); } } finally { releaseManagedConnection(); } return false; }
entity = new BasicManagedEntity(entity, managedConn, reuse); response.setEntity(entity);
public void releaseConnection() throws IOException { ensureConsumed(); }
@Override public void writeTo(final OutputStream outstream) throws IOException { super.writeTo(outstream); consumeContent(); }
@Override public void consumeContent() throws IOException { if (managedConn == null) return; try { if (attemptReuse) { // this will not trigger a callback from EofSensorInputStream wrappedEntity.consumeContent(); managedConn.markReusable(); } } finally { releaseManagedConnection(); } }
entity = new BasicManagedEntity(entity, managedConn, reuse); response.setEntity(entity);
public void releaseConnection() throws IOException { ensureConsumed(); }
public void releaseConnection() throws IOException { this.consumeContent(); }
public boolean eofDetected(InputStream wrapped) throws IOException { try { if (attemptReuse && (managedConn != null)) { // there may be some cleanup required, such as // reading trailers after the response body: wrapped.close(); managedConn.markReusable(); } } finally { releaseManagedConnection(); } return false; }
entity = new BasicManagedEntity(entity, managedConn, reuse); response.setEntity(entity);
/** * @deprecated (4.1) Use {@link EntityUtils#consume(HttpEntity)} */ @Deprecated @Override public void consumeContent() throws IOException { ensureConsumed(); }
public void releaseConnection() throws IOException { this.consumeContent(); }
public boolean streamClosed(InputStream wrapped) throws IOException { try { if (attemptReuse && (managedConn != null)) { // this assumes that closing the stream will // consume the remainder of the response body: wrapped.close(); managedConn.markReusable(); } } finally { releaseManagedConnection(); } return false; }
entity = new BasicManagedEntity(entity, managedConn, reuse); response.setEntity(entity);
/** * @deprecated (4.1) Use {@link EntityUtils#consume(HttpEntity)} */ @Deprecated @Override public void consumeContent() throws IOException { ensureConsumed(); }