diff options
Diffstat (limited to 'plugins/org.eclipse.net4j.http/src/org/eclipse/net4j/internal/http/HTTPConnector.java')
-rw-r--r-- | plugins/org.eclipse.net4j.http/src/org/eclipse/net4j/internal/http/HTTPConnector.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/org.eclipse.net4j.http/src/org/eclipse/net4j/internal/http/HTTPConnector.java b/plugins/org.eclipse.net4j.http/src/org/eclipse/net4j/internal/http/HTTPConnector.java index 548a79a944..917fe51d0e 100644 --- a/plugins/org.eclipse.net4j.http/src/org/eclipse/net4j/internal/http/HTTPConnector.java +++ b/plugins/org.eclipse.net4j.http/src/org/eclipse/net4j/internal/http/HTTPConnector.java @@ -95,7 +95,13 @@ public abstract class HTTPConnector extends Connector implements IHTTPConnector outputQueue.add(new QueuedBuffer(buffer, outputBufferCount)); } - public void writeOutputBuffers(ExtendedDataOutputStream out) throws IOException + /** + * Writes buffers from the {@link #outputQueue} to the passed stream. After each written buffer + * {@link #writeMoreBuffers()} is asked whether to send more buffers. + * + * @return <code>true</code> if more buffers are in the {@link #outputQueue}, <code>false</code> otherwise. + */ + public boolean writeOutputBuffers(ExtendedDataOutputStream out) throws IOException { do { @@ -129,6 +135,7 @@ public abstract class HTTPConnector extends Connector implements IHTTPConnector } while (writeMoreBuffers()); out.writeShort(NO_MORE_BUFFERS); + return !outputQueue.isEmpty(); } public void readInputBuffers(ExtendedDataInputStream in) throws IOException |