diff src/org/eclipse/jetty/io/JBuffer.java @ 1060:957f758dcffc

fix JBuffer.get()
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 08 Nov 2016 05:51:00 -0700
parents 013939bfc9e8
children c880589715c7
line wrap: on
line diff
--- a/src/org/eclipse/jetty/io/JBuffer.java	Tue Nov 08 05:39:33 2016 -0700
+++ b/src/org/eclipse/jetty/io/JBuffer.java	Tue Nov 08 05:51:00 2016 -0700
@@ -98,14 +98,8 @@
 	}
 
 
-	public int get(byte[] b, int offset, int length) {
-		int remaining = bb.remaining();
-		if( remaining == 0 )
-			return -1;
-		if( length > remaining )
-			length = remaining;
+	public void get(byte[] b, int offset, int length) {
 		bb.get(b,offset,length);
-		return length;
 	}
 
 
@@ -170,7 +164,7 @@
 		return n;
 	}
 
-	public final byte[] asArray() {
+	private final byte[] asArray() {
 		byte[] bytes = new byte[remaining()];
 		bb.duplicate().get(bytes);
 		return bytes;