comparison src/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java @ 1048:2b769da7f67d

remove Buffer
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 07 Nov 2016 23:15:42 -0700
parents 3c4c7cc7904f
children ebb0f1343ef6
comparison
equal deleted inserted replaced
1047:1accf965d51a 1048:2b769da7f67d
26 import java.nio.channels.SocketChannel; 26 import java.nio.channels.SocketChannel;
27 import java.util.Locale; 27 import java.util.Locale;
28 import java.util.concurrent.RejectedExecutionException; 28 import java.util.concurrent.RejectedExecutionException;
29 29
30 import org.eclipse.jetty.io.AsyncEndPoint; 30 import org.eclipse.jetty.io.AsyncEndPoint;
31 import org.eclipse.jetty.io.Buffer; 31 import org.eclipse.jetty.io.JBuffer;
32 import org.eclipse.jetty.io.EofException; 32 import org.eclipse.jetty.io.EofException;
33 import org.slf4j.Logger; 33 import org.slf4j.Logger;
34 import org.slf4j.LoggerFactory; 34 import org.slf4j.LoggerFactory;
35 35
36 36
155 } 155 }
156 } 156 }
157 } 157 }
158 158
159 @Override 159 @Override
160 public int fill(Buffer buffer) throws IOException 160 public int fill(JBuffer buffer) throws IOException
161 { 161 {
162 int fill=super.fill(buffer); 162 int fill=super.fill(buffer);
163 return fill; 163 return fill;
164 } 164 }
165 165
166 @Override 166 @Override
167 public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException 167 public int flush(JBuffer header, JBuffer buffer, JBuffer trailer) throws IOException
168 { 168 {
169 int l = super.flush(header, buffer, trailer); 169 int l = super.flush(header, buffer, trailer);
170 170
171 // If there was something to write and it wasn't written, then we are not writable. 171 // If there was something to write and it wasn't written, then we are not writable.
172 if (l==0 && ( header!=null && header.hasRemaining() || buffer!=null && buffer.hasRemaining() || trailer!=null && trailer.hasRemaining())) 172 if (l==0 && ( header!=null && header.hasRemaining() || buffer!=null && buffer.hasRemaining() || trailer!=null && trailer.hasRemaining()))
184 } 184 }
185 return l; 185 return l;
186 } 186 }
187 187
188 @Override 188 @Override
189 public int flush(Buffer buffer) throws IOException 189 public int flush(JBuffer buffer) throws IOException
190 { 190 {
191 int l = super.flush(buffer); 191 int l = super.flush(buffer);
192 192
193 // If there was something to write and it wasn't written, then we are not writable. 193 // If there was something to write and it wasn't written, then we are not writable.
194 if (l==0 && buffer!=null && buffer.hasRemaining()) 194 if (l==0 && buffer!=null && buffer.hasRemaining())