comparison src/org/eclipse/jetty/io/nio/ChannelEndPoint.java @ 1031:921c25a05eaa

remove Buffer.asReadOnlyBuffer()
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 03 Nov 2016 02:04:40 -0600
parents 0e96ce3db20a
children b71ad168fe34
comparison
equal deleted inserted replaced
1030:80cad9086593 1031:921c25a05eaa
232 Buffer buf = buffer.buffer(); 232 Buffer buf = buffer.buffer();
233 int len=0; 233 int len=0;
234 if (buf instanceof NIOBuffer) 234 if (buf instanceof NIOBuffer)
235 { 235 {
236 final NIOBuffer nbuf = (NIOBuffer)buf; 236 final NIOBuffer nbuf = (NIOBuffer)buf;
237 final ByteBuffer bbuf=nbuf.getByteBuffer().asReadOnlyBuffer(); 237 final ByteBuffer bbuf = nbuf.getByteBuffer().asReadOnlyBuffer();
238 try 238 try
239 { 239 {
240 bbuf.position(buffer.getIndex()); 240 bbuf.position(buffer.getIndex());
241 bbuf.limit(buffer.putIndex()); 241 bbuf.limit(buffer.putIndex());
242 len=_channel.write(bbuf); 242 len=_channel.write(bbuf);