diff src/org/eclipse/jetty/io/JBuffer.java @ 1062:4a50422596b6

fix JBuffer.getByteBuffer()
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 09 Nov 2016 02:04:02 -0700
parents c880589715c7
children 0157e92670f5
line wrap: on
line diff
--- a/src/org/eclipse/jetty/io/JBuffer.java	Tue Nov 08 05:54:53 2016 -0700
+++ b/src/org/eclipse/jetty/io/JBuffer.java	Wed Nov 09 02:04:02 2016 -0700
@@ -29,6 +29,10 @@
 		bb.position(i);
 	}
 
+	public int limit() {
+		return bb.limit();
+	}
+
 	public void limit(int i) {
 		bb.limit(i);
 	}
@@ -79,9 +83,7 @@
 
 
 	public ByteBuffer getByteBuffer() {
-		ByteBuffer dup = bb.duplicate();
-		dup.limit(dup.capacity());
-		return dup;
+		return bb;
 	}
 
 	public int getIndex() {