Mercurial Hosting > luan
diff src/org/eclipse/jetty/io/View.java @ 1029:4e5e9e3c25b3
remove Buffer.equalsIgnoreCase()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 03 Nov 2016 00:55:20 -0600 |
parents | cf0367978d8b |
children | 80cad9086593 |
line wrap: on
line diff
--- a/src/org/eclipse/jetty/io/View.java Thu Nov 03 00:23:04 2016 -0600 +++ b/src/org/eclipse/jetty/io/View.java Thu Nov 03 00:55:20 2016 -0600 @@ -66,54 +66,33 @@ */ public void update(Buffer buffer) { - _access=READWRITE; - _buffer=buffer.buffer(); + _access = READWRITE; + _buffer = buffer.buffer(); setGetIndex(0); setPutIndex(buffer.putIndex()); setGetIndex(buffer.getIndex()); setMarkIndex(buffer.markIndex()); - _access=buffer.isReadOnly()?READONLY:READWRITE; + _access = buffer.isReadOnly()?READONLY:READWRITE; } - public void update(int get, int put) - { - int a=_access; - _access=READWRITE; - setGetIndex(0); - setPutIndex(put); - setGetIndex(get); - setMarkIndex(-1); - _access=a; - } - - /** - * @return The {@link Buffer#array()} from the underlying buffer. - */ + @Override public byte[] array() { return _buffer.array(); } - /** - * @return The {@link Buffer#buffer()} from the underlying buffer. - */ @Override public Buffer buffer() { return _buffer.buffer(); } - /** - * @return The {@link Buffer#capacity} of the underlying buffer. - */ + @Override public int capacity() { return _buffer.capacity(); } - /** - * - */ @Override public void clear() { @@ -123,9 +102,6 @@ setGetIndex(_buffer.getIndex()); } - /** - * - */ @Override public void compact() { @@ -143,74 +119,48 @@ return this==obj ||((obj instanceof Buffer)&& obj.equals(this)) || super.equals(obj); } - /** - * @return Whether the underlying buffer is {@link Buffer#isReadOnly read only} - */ @Override public boolean isReadOnly() { return _buffer.isReadOnly(); } - /** - * @return Whether the underlying buffer is {@link Buffer#isVolatile volatile} - */ @Override public boolean isVolatile() { return true; } - /** - * @return The result of calling {@link Buffer#peek(int)} on the underlying buffer - */ + @Override public byte peek(int index) { return _buffer.peek(index); } - /** - * @return The result of calling {@link Buffer#peek(int, byte[], int, int)} on the underlying buffer - */ + @Override public int peek(int index, byte[] b, int offset, int length) { return _buffer.peek(index,b,offset,length); } - /** - * @return The result of calling {@link Buffer#peek(int, int)} on the underlying buffer - */ @Override public Buffer peek(int index, int length) { return _buffer.peek(index, length); } - /** - * @param index - * @param src - */ @Override public int poke(int index, Buffer src) { return _buffer.poke(index,src); } - /** - * @param index - * @param b - */ + @Override public void poke(int index, byte b) { _buffer.poke(index,b); } - /** - * @param index - * @param b - * @param offset - * @param length - */ @Override public int poke(int index, byte[] b, int offset, int length) {