Mercurial Hosting > luan
diff src/org/eclipse/jetty/io/JBuffer.java @ 1050:5ef954fad97b
remove JBuffer.sliceFrom()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 07 Nov 2016 23:49:41 -0700 |
parents | 4afdf0f0c5bc |
children | 1ab2dd0a7db5 |
line wrap: on
line diff
--- a/src/org/eclipse/jetty/io/JBuffer.java Mon Nov 07 23:34:48 2016 -0700 +++ b/src/org/eclipse/jetty/io/JBuffer.java Mon Nov 07 23:49:41 2016 -0700 @@ -21,6 +21,18 @@ this.bb = bb; } + public int position() { + return bb.position(); + } + + public void position(int i) { + bb.position(i); + } + + public void limit(int i) { + bb.limit(i); + } + public byte[] array() { return bb.hasArray() ? bb.array() : null; } @@ -145,13 +157,6 @@ return n; } - public final JBuffer sliceFrom(int index) { - ByteBuffer dup = bb.duplicate(); - dup.position(index); - dup.limit(bb.position()-1); - return new JBuffer(dup); - } - public int readFrom(InputStream in,int max) throws IOException { ByteBuffer dup = bb.duplicate(); int put = bb.limit();