comparison src/org/eclipse/jetty/http/HttpParser.java @ 1061:c880589715c7

remove JBuffer.setGetIndex()
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 08 Nov 2016 05:54:53 -0700
parents 013939bfc9e8
children 0157e92670f5
comparison
equal deleted inserted replaced
1060:957f758dcffc 1061:c880589715c7
105 private void compact() { 105 private void compact() {
106 if( _mark == -1 ) { 106 if( _mark == -1 ) {
107 _buffer.compact(); 107 _buffer.compact();
108 } else if( _mark > 0 ) { 108 } else if( _mark > 0 ) {
109 int old = _buffer.getIndex(); 109 int old = _buffer.getIndex();
110 _buffer.setGetIndex(_mark); 110 _buffer.position(_mark);
111 _buffer.compact(); 111 _buffer.compact();
112 _buffer.setGetIndex( old - _mark ); 112 _buffer.position( old - _mark );
113 _mark = 0; 113 _mark = 0;
114 } 114 }
115 } 115 }
116 116
117 private JBuffer getBuffer(int length) { 117 private JBuffer getBuffer(int length) {
626 _cached = HttpHeaders.CACHE.getBest(s); 626 _cached = HttpHeaders.CACHE.getBest(s);
627 627
628 if (_cached!=null) 628 if (_cached!=null)
629 { 629 {
630 _length = _cached.length(); 630 _length = _cached.length();
631 _buffer.setGetIndex(_mark+_length); 631 _buffer.position(_mark+_length);
632 length = _buffer.remaining(); 632 length = _buffer.remaining();
633 } 633 }
634 } 634 }
635 } 635 }
636 } 636 }