Mercurial Hosting > luan
diff src/org/eclipse/jetty/io/nio/SslConnection.java @ 1038:b71ad168fe34
rename Buffer.length() to remaining()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 03 Nov 2016 22:16:11 -0600 |
parents | 3c4c7cc7904f |
children | a8c92b0a08ed |
line wrap: on
line diff
--- a/src/org/eclipse/jetty/io/nio/SslConnection.java Thu Nov 03 21:54:34 2016 -0600 +++ b/src/org/eclipse/jetty/io/nio/SslConnection.java Thu Nov 03 22:16:11 2016 -0600 @@ -138,9 +138,9 @@ if (--_allocations==0) { if (_buffers!=null && - _inbound.length()==0 && - _outbound.length()==0 && - _unwrapBuf.length()==0) + _inbound.remaining()==0 && + _outbound.remaining()==0 && + _unwrapBuf.remaining()==0) { _inbound=null; _outbound=null; @@ -279,7 +279,7 @@ } finally { - _logger.debug("{} {} {} filled={}/{} flushed={}/{}",_session,this,_engine.getHandshakeStatus(),filled,_inbound.length(),flushed,_outbound.length()); + _logger.debug("{} {} {} filled={}/{} flushed={}/{}",_session,this,_engine.getHandshakeStatus(),filled,_inbound.remaining(),flushed,_outbound.remaining()); } // handle the current hand share status @@ -605,10 +605,10 @@ public int fill(Buffer buffer) throws IOException { - int size=buffer.length(); + int size=buffer.remaining(); process(buffer, null); - int filled=buffer.length()-size; + int filled=buffer.remaining()-size; if (filled==0 && isInputShutdown()) return -1; @@ -617,9 +617,9 @@ public int flush(Buffer buffer) throws IOException { - int size = buffer.length(); + int size = buffer.remaining(); process(null, buffer); - return size-buffer.length(); + return size-buffer.remaining(); } public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException @@ -737,9 +737,9 @@ Buffer inbound = _inbound; Buffer outbound = _outbound; Buffer unwrap = _unwrapBuf; - int i = inbound == null? -1 : inbound.length(); - int o = outbound == null ? -1 : outbound.length(); - int u = unwrap == null ? -1 : unwrap.length(); + int i = inbound == null? -1 : inbound.remaining(); + int o = outbound == null ? -1 : outbound.remaining(); + int u = unwrap == null ? -1 : unwrap.remaining(); return String.format("SSL %s i/o/u=%d/%d/%d ishut=%b oshut=%b {%s}", _engine.getHandshakeStatus(), i, o, u,