test_class.declarator: headers
test_class.modifier: private
test_class.original_string: private HashMap<String, String> headers;
test_class.type: HashMap<String, String>
test_class.var_name: headers
test_class.declarator: service
test_class.modifier: private
test_class.original_string: private WebSocketXMPPIOService service;
test_class.type: WebSocketXMPPIOService
test_class.var_name: service
test_class.file: tigase-server 7.1.0/src/test/java/tigase/server/websocket/WebSocketXMPPIOServiceTest.java
test_class.identifier: WebSocketXMPPIOServiceTest
test_class.superclass: extends TestCase
test_case.body: @Test
  	public void testHttpHeadersParsingWithoutSpaces() throws UnsupportedEncodingException {
  		byte[] data = prepareHTTPRequest(headers, false);
  
  		Map<String, String> parsedHeaders = new HashMap<>();
  		service.parseHttpHeaders(data, parsedHeaders);
  
  		assertMaps(headers, parsedHeaders);
  	}
test_case.class_method_signature: WebSocketXMPPIOServiceTest.testHttpHeadersParsingWithoutSpaces()
test_case.full_signature: @Test public void testHttpHeadersParsingWithoutSpaces()
test_case.identifier: testHttpHeadersParsingWithoutSpaces
test_case.invocations: prepareHTTPRequest parseHttpHeaders assertMaps
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testHttpHeadersParsingWithoutSpaces()
focal_class.declarator: BAD_REQUEST    = "HTTP/1.0 400 Bad request\r\n\r\n"
focal_class.modifier: private static final
focal_class.original_string: private static final String BAD_REQUEST    = "HTTP/1.0 400 Bad request\r\n\r\n";
focal_class.type: String
focal_class.var_name: BAD_REQUEST
focal_class.declarator: CONNECTION_KEY = "Connection"
focal_class.modifier: private static final
focal_class.original_string: private static final String CONNECTION_KEY = "Connection";
focal_class.type: String
focal_class.var_name: CONNECTION_KEY
focal_class.declarator: log            =
  		Logger.getLogger(WebSocketXMPPIOService.class.getCanonicalName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log            =
  		Logger.getLogger(WebSocketXMPPIOService.class.getCanonicalName());
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: CLOSE_EL = "close"
focal_class.modifier: private static final
focal_class.original_string: private static final String CLOSE_EL = "close";
focal_class.type: String
focal_class.var_name: CLOSE_EL
focal_class.declarator: OPEN_EL = "open"
focal_class.modifier: private static final
focal_class.original_string: private static final String OPEN_EL = "open";
focal_class.type: String
focal_class.var_name: OPEN_EL
focal_class.declarator: XMLNS_FRAMING = "urn:ietf:params:xml:ns:xmpp-framing"
focal_class.modifier: private static final
focal_class.original_string: private static final String XMLNS_FRAMING = "urn:ietf:params:xml:ns:xmpp-framing";
focal_class.type: String
focal_class.var_name: XMLNS_FRAMING
focal_class.declarator: frameLength  = -1
focal_class.modifier: protected
focal_class.original_string: protected long frameLength  = -1;
focal_class.type: long
focal_class.var_name: frameLength
focal_class.declarator: maskingKey = null
focal_class.modifier: protected
focal_class.original_string: protected byte[] maskingKey = null;
focal_class.type: byte[]
focal_class.var_name: maskingKey
focal_class.declarator: partialData = null
focal_class.modifier: private
focal_class.original_string: private byte[] partialData = null;
focal_class.type: byte[]
focal_class.var_name: partialData
focal_class.declarator: state = State.handshaking
focal_class.modifier: private
focal_class.original_string: private State state = State.handshaking;
focal_class.type: State
focal_class.var_name: state
focal_class.declarator: started   = false
focal_class.modifier: private
focal_class.original_string: private boolean started   = false;
focal_class.type: boolean
focal_class.var_name: started
focal_class.declarator: protocols
focal_class.modifier: private final
focal_class.original_string: private final WebSocketProtocolIfc[] protocols;
focal_class.type: WebSocketProtocolIfc[]
focal_class.var_name: protocols
focal_class.declarator: protocol = null
focal_class.modifier: private
focal_class.original_string: private WebSocketProtocolIfc protocol = null;
focal_class.type: WebSocketProtocolIfc
focal_class.var_name: protocol
focal_class.declarator: webSocketXMPPSpec = WebSocketXMPPSpec.hybi
focal_class.modifier: private
focal_class.original_string: private WebSocketXMPPSpec webSocketXMPPSpec = WebSocketXMPPSpec.hybi;
focal_class.type: WebSocketXMPPSpec
focal_class.var_name: webSocketXMPPSpec
focal_class.file: tigase-server 7.1.0/src/main/java/tigase/server/websocket/WebSocketXMPPIOService.java
focal_class.identifier: WebSocketXMPPIOService
focal_class.class_method_signature: WebSocketXMPPIOService.WebSocketXMPPIOService(WebSocketProtocolIfc[] enabledProtocols)
focal_class.full_signature: public  WebSocketXMPPIOService(WebSocketProtocolIfc[] enabledProtocols)
focal_class.identifier: WebSocketXMPPIOService
focal_class.modifiers: public
focal_class.parameters: (WebSocketProtocolIfc[] enabledProtocols)
focal_class.signature:  WebSocketXMPPIOService(WebSocketProtocolIfc[] enabledProtocols)
focal_class.class_method_signature: WebSocketXMPPIOService.stop()
focal_class.full_signature: @Override public void stop()
focal_class.identifier: stop
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stop()
focal_class.class_method_signature: WebSocketXMPPIOService.getState()
focal_class.full_signature: protected State getState()
focal_class.identifier: getState
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: State
focal_class.signature: State getState()
focal_class.class_method_signature: WebSocketXMPPIOService.setState(State state)
focal_class.full_signature: protected void setState(State state)
focal_class.identifier: setState
focal_class.modifiers: protected
focal_class.parameters: (State state)
focal_class.return: void
focal_class.signature: void setState(State state)
focal_class.class_method_signature: WebSocketXMPPIOService.addReceivedPacket(Packet packet)
focal_class.full_signature: @Override protected void addReceivedPacket(Packet packet)
focal_class.identifier: addReceivedPacket
focal_class.modifiers: @Override protected
focal_class.parameters: (Packet packet)
focal_class.return: void
focal_class.signature: void addReceivedPacket(Packet packet)
focal_class.class_method_signature: WebSocketXMPPIOService.processSocketData()
focal_class.full_signature: @Override protected void processSocketData()
focal_class.identifier: processSocketData
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void processSocketData()
focal_class.class_method_signature: WebSocketXMPPIOService.getWebSocketXMPPSpec()
focal_class.full_signature: protected WebSocketXMPPSpec getWebSocketXMPPSpec()
focal_class.identifier: getWebSocketXMPPSpec
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: WebSocketXMPPSpec
focal_class.signature: WebSocketXMPPSpec getWebSocketXMPPSpec()
focal_class.class_method_signature: WebSocketXMPPIOService.prepareStreamClose()
focal_class.full_signature: @Override protected String prepareStreamClose()
focal_class.identifier: prepareStreamClose
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String prepareStreamClose()
focal_class.class_method_signature: WebSocketXMPPIOService.readData()
focal_class.full_signature: @Override protected char[] readData()
focal_class.identifier: readData
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: char[]
focal_class.signature: char[] readData()
focal_class.class_method_signature: WebSocketXMPPIOService.writeData(final String data)
focal_class.full_signature: @Override protected void writeData(final String data)
focal_class.identifier: writeData
focal_class.modifiers: @Override protected
focal_class.parameters: (final String data)
focal_class.return: void
focal_class.signature: void writeData(final String data)
focal_class.class_method_signature: WebSocketXMPPIOService.processWebSocketHandshake(byte[] buf)
focal_class.full_signature: private void processWebSocketHandshake(byte[] buf)
focal_class.identifier: processWebSocketHandshake
focal_class.modifiers: private
focal_class.parameters: (byte[] buf)
focal_class.return: void
focal_class.signature: void processWebSocketHandshake(byte[] buf)
focal_class.class_method_signature: WebSocketXMPPIOService.parseHttpHeaders(byte[] buf, Map<String, String> headers)
focal_class.full_signature: protected int parseHttpHeaders(byte[] buf, Map<String, String> headers)
focal_class.identifier: parseHttpHeaders
focal_class.modifiers: protected
focal_class.parameters: (byte[] buf, Map<String, String> headers)
focal_class.return: int
focal_class.signature: int parseHttpHeaders(byte[] buf, Map<String, String> headers)
focal_class.class_method_signature: WebSocketXMPPIOService.writeBytes(ByteBuffer data)
focal_class.full_signature: @Override protected void writeBytes(ByteBuffer data)
focal_class.identifier: writeBytes
focal_class.modifiers: @Override protected
focal_class.parameters: (ByteBuffer data)
focal_class.return: void
focal_class.signature: void writeBytes(ByteBuffer data)
focal_class.class_method_signature: WebSocketXMPPIOService.decodeFrame(ByteBuffer buf)
focal_class.full_signature: private ByteBuffer decodeFrame(ByteBuffer buf)
focal_class.identifier: decodeFrame
focal_class.modifiers: private
focal_class.parameters: (ByteBuffer buf)
focal_class.return: ByteBuffer
focal_class.signature: ByteBuffer decodeFrame(ByteBuffer buf)
focal_class.class_method_signature: WebSocketXMPPIOService.decode(ByteBuffer tmpBuffer)
focal_class.full_signature: private char[] decode(ByteBuffer tmpBuffer)
focal_class.identifier: decode
focal_class.modifiers: private
focal_class.parameters: (ByteBuffer tmpBuffer)
focal_class.return: char[]
focal_class.signature: char[] decode(ByteBuffer tmpBuffer)
focal_class.class_method_signature: WebSocketXMPPIOService.encode(String data)
focal_class.full_signature: private ByteBuffer encode(String data)
focal_class.identifier: encode
focal_class.modifiers: private
focal_class.parameters: (String data)
focal_class.return: ByteBuffer
focal_class.signature: ByteBuffer encode(String data)
focal_class.class_method_signature: WebSocketXMPPIOService.dumpHeaders(Map<String,String> headers)
focal_class.full_signature: public void dumpHeaders(Map<String,String> headers)
focal_class.identifier: dumpHeaders
focal_class.modifiers: public
focal_class.parameters: (Map<String,String> headers)
focal_class.return: void
focal_class.signature: void dumpHeaders(Map<String,String> headers)
focal_class.superclass: extends XMPPIOService<RefObject>
focal_method.body: protected int parseHttpHeaders(byte[] buf, Map<String, String> headers) {
  		int i                           = 0;
  
  		while (buf[i] != '\n') {
  			i++;
  		}
  		i++;
  		if (log.isLoggable(Level.FINEST)) {
  			log.log(Level.FINEST, "parsing request = \n{0}", new String(buf));
  		}
  
  		StringBuilder builder = new StringBuilder(64);
  		String key            = null;
  
  		boolean skipWhitespace = false;
  		for (; i < buf.length; i++) {
  			switch (buf[i]) {
  				case ':':
  					if (key == null) {
  						key = builder.toString().trim();
  						builder = new StringBuilder(64);
  						skipWhitespace = true;
  					} else {
  						builder.append((char) buf[i]);
  					}
  
  					break;
  
  				case '\r':
  					headers.put(key, builder.toString().trim());
  					key = null;
  					builder = new StringBuilder(64);
  					if (buf[i + 2] == '\r') {
  						i += 3;
  					} else {
  						i++;
  					}
  
  					break;
  
  				case ' ':
  				case '\t':
  					if (!skipWhitespace) {
  						builder.append((char) buf[i]);
  					}
  					break;
  
  				default:
  					skipWhitespace = false;
  					builder.append((char) buf[i]);
  			}
  		}
  		return i;
  	}
focal_method.class_method_signature: WebSocketXMPPIOService.parseHttpHeaders(byte[] buf, Map<String, String> headers)
focal_method.full_signature: protected int parseHttpHeaders(byte[] buf, Map<String, String> headers)
focal_method.identifier: parseHttpHeaders
focal_method.invocations: isLoggable log trim toString append put trim toString append append
focal_method.modifiers: protected
focal_method.parameters: (byte[] buf, Map<String, String> headers)
focal_method.return: int
focal_method.signature: int parseHttpHeaders(byte[] buf, Map<String, String> headers)