diff src/org/eclipse/jetty/io/BufferUtil.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 9d357b9e4bcb
line wrap: on
line diff
--- a/src/org/eclipse/jetty/io/BufferUtil.java	Wed Nov 09 04:36:05 2016 -0700
+++ b/src/org/eclipse/jetty/io/BufferUtil.java	Wed Nov 09 05:48:10 2016 -0700
@@ -75,18 +75,18 @@
 
 		if (n < 0)
 		{
-			buffer.put((byte)'-');
+			buffer.putQ((byte)'-');
 
 			if (n == Integer.MIN_VALUE)
 			{
-				buffer.put((byte)(0x7f&'8'));
-				buffer.put((byte)(0x7f&'0'));
-				buffer.put((byte)(0x7f&'0'));
-				buffer.put((byte)(0x7f&'0'));
-				buffer.put((byte)(0x7f&'0'));
-				buffer.put((byte)(0x7f&'0'));
-				buffer.put((byte)(0x7f&'0'));
-				buffer.put((byte)(0x7f&'0'));
+				buffer.putQ((byte)(0x7f&'8'));
+				buffer.putQ((byte)(0x7f&'0'));
+				buffer.putQ((byte)(0x7f&'0'));
+				buffer.putQ((byte)(0x7f&'0'));
+				buffer.putQ((byte)(0x7f&'0'));
+				buffer.putQ((byte)(0x7f&'0'));
+				buffer.putQ((byte)(0x7f&'0'));
+				buffer.putQ((byte)(0x7f&'0'));
 				
 				return;
 			}
@@ -95,7 +95,7 @@
 
 		if (n < 0x10)
 		{
-			buffer.put(DIGIT[n]);
+			buffer.putQ(DIGIT[n]);
 		}
 		else
 		{
@@ -106,13 +106,13 @@
 				if (n < hexDivisors[i])
 				{
 					if (started)
-						buffer.put((byte)'0');
+						buffer.putQ((byte)'0');
 					continue;
 				}
 
 				started= true;
 				int d = n / hexDivisors[i];
-				buffer.put(DIGIT[d]);
+				buffer.putQ(DIGIT[d]);
 				n= n - d * hexDivisors[i];
 			}
 		}
@@ -122,11 +122,11 @@
 	{
 		if (n < 0)
 		{
-			buffer.put((byte)'-');
+			buffer.putQ((byte)'-');
 
 			if (n == Long.MIN_VALUE)
 			{
-				buffer.put((byte)'9');
+				buffer.putQ((byte)'9');
 				n = 223372036854775808L;
 			}
 			else
@@ -135,7 +135,7 @@
 
 		if (n < 10)
 		{
-			buffer.put(DIGIT[(int)n]);
+			buffer.putQ(DIGIT[(int)n]);
 		}
 		else
 		{
@@ -146,13 +146,13 @@
 				if (n < decDivisorsL[i])
 				{
 					if (started)
-						buffer.put((byte)'0');
+						buffer.putQ((byte)'0');
 					continue;
 				}
 
 				started= true;
 				long d= n / decDivisorsL[i];
-				buffer.put(DIGIT[(int)d]);
+				buffer.putQ(DIGIT[(int)d]);
 				n= n - d * decDivisorsL[i];
 			}
 		}
@@ -194,12 +194,6 @@
 	};
 
 
-	public static void putCRLF(JBuffer buffer)
-	{
-		buffer.put((byte)13);
-		buffer.put((byte)10);
-	}
-
 
 	public static final JBuffer EMPTY_BUFFER = new JBuffer(ByteBuffer.allocate(0));