Mercurial Hosting > luan
diff src/org/eclipse/jetty/http/AbstractGenerator.java @ 1048:2b769da7f67d
remove Buffer
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 07 Nov 2016 23:15:42 -0700 |
parents | a8c92b0a08ed |
children |
line wrap: on
line diff
--- a/src/org/eclipse/jetty/http/AbstractGenerator.java Mon Nov 07 22:51:09 2016 -0700 +++ b/src/org/eclipse/jetty/http/AbstractGenerator.java Mon Nov 07 23:15:42 2016 -0700 @@ -20,7 +20,7 @@ import java.io.IOException; -import org.eclipse.jetty.io.Buffer; +import org.eclipse.jetty.io.JBuffer; import org.eclipse.jetty.io.Buffers; import org.eclipse.jetty.io.BufferUtil; import org.eclipse.jetty.io.EndPoint; @@ -59,8 +59,8 @@ int _status = 0; int _version = HttpVersions.HTTP_1_1_ORDINAL; - Buffer _reason; - Buffer _method; + JBuffer _reason; + JBuffer _method; String _uri; long _contentWritten = 0; @@ -70,9 +70,9 @@ boolean _noContent = false; Boolean _persistent = null; - Buffer _header; // Buffer for HTTP header (and maybe small _content) - Buffer _buffer; // Buffer for copy of passed _content - Buffer _content; // Buffer passed to addContent + JBuffer _header; // JBuffer for HTTP header (and maybe small _content) + JBuffer _buffer; // JBuffer for copy of passed _content + JBuffer _content; // JBuffer passed to addContent /* ------------------------------------------------------------------------------- */ @@ -94,12 +94,12 @@ * * @param content * @param last - * @throws IllegalArgumentException if <code>content</code> is {@link Buffer#isImmutable immutable}. + * @throws IllegalArgumentException if <code>content</code> is {@link JBuffer#isImmutable immutable}. * @throws IllegalStateException If the request is not expecting any more content, * or if the buffers are full and cannot be flushed. * @throws IOException if there is a problem flushing the buffers. */ - public abstract void addContent(Buffer content, boolean last) throws IOException; + public abstract void addContent(JBuffer content, boolean last) throws IOException; abstract boolean isRequest(); @@ -133,7 +133,7 @@ return _buffer.capacity(); } - public final Buffer getUncheckedBuffer() + public final JBuffer getUncheckedBuffer() { return _buffer; } @@ -294,8 +294,8 @@ // block until everything is flushed long now=System.currentTimeMillis(); long end=now+maxIdleTime; - Buffer content = _content; - Buffer buffer = _buffer; + JBuffer content = _content; + JBuffer buffer = _buffer; if (content!=null && content.remaining()>0 || buffer!=null && buffer.remaining()>0 || isBufferFull()) { flushBuffer();