changeset 1074:6b7ff30bb990

rename putQ() to put()
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 10 Nov 2016 02:37:15 -0700
parents 6e511ea557b4
children ebb0f1343ef6
files src/org/eclipse/jetty/http/HttpFields.java src/org/eclipse/jetty/http/HttpGenerator.java src/org/eclipse/jetty/io/BufferUtil.java src/org/eclipse/jetty/io/JBuffer.java src/org/eclipse/jetty/io/nio/SslConnection.java src/org/eclipse/jetty/server/AbstractHttpConnection.java
diffstat 6 files changed, 85 insertions(+), 85 deletions(-) [+]
line wrap: on
line diff
--- a/src/org/eclipse/jetty/http/HttpFields.java	Thu Nov 10 02:33:09 2016 -0700
+++ b/src/org/eclipse/jetty/http/HttpFields.java	Thu Nov 10 02:37:15 2016 -0700
@@ -947,7 +947,7 @@
 		{
 			byte[] nameBytes = StringUtil.getBytes(_name);
 			if (getNameOrdinal() >=0 )
-				buffer.putQ(nameBytes);
+				buffer.put(nameBytes);
 			else
 			{
 				for( byte b : nameBytes ) {
@@ -958,17 +958,17 @@
 						case ':' :
 							continue;
 						default:
-							buffer.putQ(b);
+							buffer.put(b);
 					}
 				}
 			}
 			
-			buffer.putQ((byte) ':');
-			buffer.putQ((byte) ' ');
+			buffer.put((byte) ':');
+			buffer.put((byte) ' ');
 			
 			byte[] valueBytes = StringUtil.getBytes(_value);
 			if (getValueOrdinal() >= 0)
-				buffer.putQ(valueBytes);
+				buffer.put(valueBytes);
 			else
 			{
 				for( byte b : valueBytes ) {
@@ -978,13 +978,13 @@
 						case '\n':
 							continue;
 						default:
-							buffer.putQ(b);
+							buffer.put(b);
 					}
 				}
 			}
 
-			buffer.putQ((byte)'\r');
-			buffer.putQ((byte)'\n');
+			buffer.put((byte)'\r');
+			buffer.put((byte)'\n');
 		}
 
 		private String getName()
--- a/src/org/eclipse/jetty/http/HttpGenerator.java	Thu Nov 10 02:33:09 2016 -0700
+++ b/src/org/eclipse/jetty/http/HttpGenerator.java	Thu Nov 10 02:37:15 2016 -0700
@@ -150,19 +150,19 @@
 				if (_bufferChunked)
 				{
 					JBuffer nc = _buffers.getBuffer(_content.remaining()+CHUNK_SPACE+content.remaining());
-					nc.putQ(_content);
-					nc.putQ(HttpTokens.CRLF);
+					nc.put(_content);
+					nc.put(HttpTokens.CRLF);
 					BufferUtil.putHexInt(nc, content.remaining());
-					nc.putQ(HttpTokens.CRLF);
-					nc.putQ(content);
+					nc.put(HttpTokens.CRLF);
+					nc.put(content);
 					nc.flip();
 					content = nc;
 				}
 				else
 				{
 					JBuffer nc = _buffers.getBuffer(_content.remaining()+content.remaining());
-					nc.putQ(_content);
-					nc.putQ(content);
+					nc.put(_content);
+					nc.put(content);
 					nc.flip();
 					content = nc;
 				}
@@ -186,7 +186,7 @@
 		{
 //System.out.println("qqqqqqqqqqqqqqqqqqq c");
 			// Copy _content to buffer;
-			_buffer.putQ(_content);
+			_buffer.put(_content);
 			if (!_content.hasRemaining())
 				_content = null;
 		}
@@ -236,8 +236,8 @@
 		if (status==null)
 			throw new IllegalArgumentException(code+"?");
 
-		_header.putQ(status._responseLine);
-		_header.putQ(HttpTokens.CRLF);
+		_header.put(status._responseLine);
+		_header.put(HttpTokens.CRLF);
 
 		try
 		{
@@ -294,31 +294,31 @@
 
 				if (status==null)
 				{
-					_header.putQ(HttpVersions.HTTP_1_1_BYTES);
-					_header.putQ((byte) ' ');
-					_header.putQ((byte) ('0' + _status / 100));
-					_header.putQ((byte) ('0' + (_status % 100) / 10));
-					_header.putQ((byte) ('0' + (_status % 10)));
-					_header.putQ((byte) ' ');
+					_header.put(HttpVersions.HTTP_1_1_BYTES);
+					_header.put((byte) ' ');
+					_header.put((byte) ('0' + _status / 100));
+					_header.put((byte) ('0' + (_status % 100) / 10));
+					_header.put((byte) ('0' + (_status % 10)));
+					_header.put((byte) ' ');
 					if (_reason==null)
 					{
-						_header.putQ((byte) ('0' + _status / 100));
-						_header.putQ((byte) ('0' + (_status % 100) / 10));
-						_header.putQ((byte) ('0' + (_status % 10)));
+						_header.put((byte) ('0' + _status / 100));
+						_header.put((byte) ('0' + (_status % 100) / 10));
+						_header.put((byte) ('0' + (_status % 10)));
 					}
 					else
-						_header.putQ(_reason);
-					_header.putQ(HttpTokens.CRLF);
+						_header.put(_reason);
+					_header.put(HttpTokens.CRLF);
 				}
 				else
 				{
 					if (_reason==null)
-						_header.putQ(status._responseLine);
+						_header.put(status._responseLine);
 					else
 					{
-						_header.putQ(status._schemeCode);
-						_header.putQ(_reason);
-						_header.putQ(HttpTokens.CRLF);
+						_header.put(status._schemeCode);
+						_header.put(_reason);
+						_header.put(HttpTokens.CRLF);
 					}
 				}
 
@@ -331,7 +331,7 @@
 
 					if (_status!=101 )
 					{
-						_header.putQ(HttpTokens.CRLF);
+						_header.put(HttpTokens.CRLF);
 						_state = STATE_CONTENT;
 						return;
 					}
@@ -514,11 +514,11 @@
 						if (content_length == null && !_noContent)
 						{
 							// known length but not actually set.
-							_header.putQ(HttpHeaders.CONTENT_LENGTH_BYTES);
-							_header.putQ(HttpTokens.COLON);
-							_header.putQ((byte) ' ');
+							_header.put(HttpHeaders.CONTENT_LENGTH_BYTES);
+							_header.put(HttpTokens.COLON);
+							_header.put((byte) ' ');
 							BufferUtil.putDecLong(_header, _contentLength);
-							_header.putQ(HttpTokens.CRLF);
+							_header.put(HttpTokens.CRLF);
 						}
 					}
 					else
@@ -530,7 +530,7 @@
 
 				case HttpTokens.NO_CONTENT:
 					if (content_length == null && _status >= 200 && _status != 204 && _status != 304)
-						_header.putQ(CONTENT_LENGTH_0);
+						_header.put(CONTENT_LENGTH_0);
 					break;
 
 				case HttpTokens.EOF_CONTENT:
@@ -558,7 +558,7 @@
 						throw new IllegalArgumentException("BAD TE");
 				}
 				else
-					_header.putQ(TRANSFER_ENCODING_CHUNKED);
+					_header.put(TRANSFER_ENCODING_CHUNKED);
 			}
 
 			// Handle connection if need be
@@ -570,38 +570,38 @@
 
 			if (!_persistent && (close || _version > HttpVersions.HTTP_1_0_ORDINAL))
 			{
-				_header.putQ(CONNECTION_CLOSE);
+				_header.put(CONNECTION_CLOSE);
 				if (connection!=null)
 				{
 					_header.position(_header.position()-2);
-					_header.putQ((byte)',');
-					_header.putQ(connection.toString().getBytes());
-					_header.putQ(CRLF);
+					_header.put((byte)',');
+					_header.put(connection.toString().getBytes());
+					_header.put(CRLF);
 				}
 			}
 			else if (keep_alive)
 			{
-				_header.putQ(CONNECTION_KEEP_ALIVE);
+				_header.put(CONNECTION_KEEP_ALIVE);
 				if (connection!=null)
 				{
 					_header.position(_header.position()-2);
-					_header.putQ((byte)',');
-					_header.putQ(connection.toString().getBytes());
-					_header.putQ(CRLF);
+					_header.put((byte)',');
+					_header.put(connection.toString().getBytes());
+					_header.put(CRLF);
 				}
 			}
 			else if (connection!=null)
 			{
-				_header.putQ(CONNECTION_);
-				_header.putQ(connection.toString().getBytes());
-				_header.putQ(CRLF);
+				_header.put(CONNECTION_);
+				_header.put(connection.toString().getBytes());
+				_header.put(CRLF);
 			}
 
 			if (!has_server && _status>199)
-				_header.putQ(SERVER);
+				_header.put(SERVER);
 
 			// end the header.
-			_header.putQ(HttpTokens.CRLF);
+			_header.put(HttpTokens.CRLF);
 			_state = STATE_CONTENT;
 
 		}
@@ -704,7 +704,7 @@
 							// an addContent that caused a buffer flush.
 							if (_content != null && _content.remaining() < _buffer.remaining() && _state != STATE_FLUSHING)
 							{
-								_buffer.putQ(_content);
+								_buffer.put(_content);
 								_content = null;
 							}
 						}
@@ -757,7 +757,7 @@
 			// Refill buffer if possible
 			if (!_bypass && _content != null && _content.hasRemaining() && _buffer.hasRemaining())
 			{
-				_buffer.putQ(_content);
+				_buffer.put(_content);
 				if (!_content.hasRemaining())
 					_content = null;
 			}
@@ -775,12 +775,12 @@
 					if (_needCRLF)
 					{
 						if (_header.position() > 0) throw new IllegalStateException("EOC");
-						_header.putQ(HttpTokens.CRLF);
+						_header.put(HttpTokens.CRLF);
 						_needCRLF = false;
 					}
 					// Add the chunk size to the header
 					BufferUtil.putHexInt(_header, size);
-					_header.putQ(HttpTokens.CRLF);
+					_header.put(HttpTokens.CRLF);
 
 					// Need a CRLF after the content
 					_needCRLF = true;
@@ -796,15 +796,15 @@
 						if (_needCRLF)
 						{
 							if (_header.position() > 0) throw new IllegalStateException("EOC");
-							_header.putQ(HttpTokens.CRLF);
+							_header.put(HttpTokens.CRLF);
 							_needCRLF = false;
 						}
 						BufferUtil.putHexInt(_header, size);
-						_header.putQ(HttpTokens.CRLF);
+						_header.put(HttpTokens.CRLF);
 
 						// Add end chunk trailer.
 						if (_buffer.remaining() >= 2)
-							_buffer.putQ(HttpTokens.CRLF);
+							_buffer.put(HttpTokens.CRLF);
 						else
 							_needCRLF = true;
 					}
@@ -814,14 +814,14 @@
 				if (_needEOC && (_content == null || !_content.hasRemaining()))
 				{
 					if (_needCRLF && _buffer.remaining() >= HttpTokens.CRLF.length) {
-						_buffer.putQ(HttpTokens.CRLF);
+						_buffer.put(HttpTokens.CRLF);
 						_needCRLF = false;
 					}
 
 					if (!_needCRLF && _needEOC && _buffer.remaining() >= LAST_CHUNK.length) {
 						if (!_head)
 						{
-							_buffer.putQ(LAST_CHUNK);
+							_buffer.put(LAST_CHUNK);
 							_bufferChunked = true;
 						}
 						_needEOC = false;
@@ -1010,9 +1010,9 @@
 			{
 				char ch = reason.charAt(i);
 				if (ch!='\r'&&ch!='\n')
-					_reason.putQ((byte)ch);
+					_reason.put((byte)ch);
 				else
-					_reason.putQ((byte)' ');
+					_reason.put((byte)' ');
 			}
 			_reason.flip();
 		}
--- a/src/org/eclipse/jetty/io/BufferUtil.java	Thu Nov 10 02:33:09 2016 -0700
+++ b/src/org/eclipse/jetty/io/BufferUtil.java	Thu Nov 10 02:37:15 2016 -0700
@@ -75,18 +75,18 @@
 
 		if (n < 0)
 		{
-			buffer.putQ((byte)'-');
+			buffer.put((byte)'-');
 
 			if (n == Integer.MIN_VALUE)
 			{
-				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'));
+				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'));
 				
 				return;
 			}
@@ -95,7 +95,7 @@
 
 		if (n < 0x10)
 		{
-			buffer.putQ(DIGIT[n]);
+			buffer.put(DIGIT[n]);
 		}
 		else
 		{
@@ -106,13 +106,13 @@
 				if (n < hexDivisors[i])
 				{
 					if (started)
-						buffer.putQ((byte)'0');
+						buffer.put((byte)'0');
 					continue;
 				}
 
 				started= true;
 				int d = n / hexDivisors[i];
-				buffer.putQ(DIGIT[d]);
+				buffer.put(DIGIT[d]);
 				n= n - d * hexDivisors[i];
 			}
 		}
@@ -122,11 +122,11 @@
 	{
 		if (n < 0)
 		{
-			buffer.putQ((byte)'-');
+			buffer.put((byte)'-');
 
 			if (n == Long.MIN_VALUE)
 			{
-				buffer.putQ((byte)'9');
+				buffer.put((byte)'9');
 				n = 223372036854775808L;
 			}
 			else
@@ -135,7 +135,7 @@
 
 		if (n < 10)
 		{
-			buffer.putQ(DIGIT[(int)n]);
+			buffer.put(DIGIT[(int)n]);
 		}
 		else
 		{
@@ -146,13 +146,13 @@
 				if (n < decDivisorsL[i])
 				{
 					if (started)
-						buffer.putQ((byte)'0');
+						buffer.put((byte)'0');
 					continue;
 				}
 
 				started= true;
 				long d= n / decDivisorsL[i];
-				buffer.putQ(DIGIT[(int)d]);
+				buffer.put(DIGIT[(int)d]);
 				n= n - d * decDivisorsL[i];
 			}
 		}
--- a/src/org/eclipse/jetty/io/JBuffer.java	Thu Nov 10 02:33:09 2016 -0700
+++ b/src/org/eclipse/jetty/io/JBuffer.java	Thu Nov 10 02:37:15 2016 -0700
@@ -91,15 +91,15 @@
 	}
 
 
-	public void putQ(JBuffer src) {
+	public void put(JBuffer src) {
 		bb.put(src.bb);
 	}
 
-	public void putQ(byte b) {
+	public void put(byte b) {
 		bb.put(b);
 	}
 
-	public void putQ(byte[] b) {
+	public void put(byte[] b) {
 		bb.put(b);
 	}
 
--- a/src/org/eclipse/jetty/io/nio/SslConnection.java	Thu Nov 10 02:33:09 2016 -0700
+++ b/src/org/eclipse/jetty/io/nio/SslConnection.java	Thu Nov 10 02:37:15 2016 -0700
@@ -216,7 +216,7 @@
 		JBuffer dup = toFill.duplicate();
 		dup.position(dup.limit());
 		dup.limit(dup.capacity());
-		dup.putQ(_unwrapBuf);
+		dup.put(_unwrapBuf);
 		toFill.limit(dup.position());
 	}
 
--- a/src/org/eclipse/jetty/server/AbstractHttpConnection.java	Thu Nov 10 02:33:09 2016 -0700
+++ b/src/org/eclipse/jetty/server/AbstractHttpConnection.java	Thu Nov 10 02:37:15 2016 -0700
@@ -739,7 +739,7 @@
 				_onebyte = BufferUtil.newBuffer(1);
 			else
 				_onebyte.clear();
-			_onebyte.putQ((byte)b);
+			_onebyte.put((byte)b);
 			write(_onebyte);
 		}