diff src/org/eclipse/jetty/io/JBuffer.java @ 1066:bbbda7c6e8ec

fix use of HttpGenerator._header
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 09 Nov 2016 05:48:10 -0700
parents 158d1e6ac17f
children b4ba8a4d5a16
line wrap: on
line diff
--- a/src/org/eclipse/jetty/io/JBuffer.java	Wed Nov 09 04:36:05 2016 -0700
+++ b/src/org/eclipse/jetty/io/JBuffer.java	Wed Nov 09 05:48:10 2016 -0700
@@ -81,6 +81,10 @@
 		return bb;
 	}
 
+	public void clear() {
+		bb.clear();
+	}
+
 	public void clearJ() {
 		bb.position(0);
 		bb.limit(0);
@@ -96,10 +100,18 @@
 	}
 
 
+	public void putQ(JBuffer src) {
+		bb.put(src.bb);
+	}
+
 	public int put(JBuffer src) {
 		return put(src.asArray());
 	}
 
+	public void putQ(byte b) {
+		bb.put(b);
+	}
+
 	public void put(byte b)
 	{
 		ByteBuffer dup = bb.duplicate();
@@ -122,16 +134,12 @@
 		return length;
 	}
 
-	public int put(byte[] b) {
-		return put(b,0,b.length);
+	public void putQ(byte[] b) {
+		bb.put(b);
 	}
 
-	public final int putIndex() {
-		return bb.limit();
-	}
-
-	public void setPutIndex(int putIndex) {
-		bb.limit(putIndex);
+	public int put(byte[] b) {
+		return put(b,0,b.length);
 	}
 
 	public void skip(int n) {
@@ -157,4 +165,8 @@
 		return bb.get(index);
 	}
 
+	public void flip() {
+		bb.flip();
+	}
+
 }