org.freeswitch.esl.client.internal
Class HeaderParser

java.lang.Object
  extended by org.freeswitch.esl.client.internal.HeaderParser

public class HeaderParser
extends Object

This parser provides a static helper method to split a standard Header field into the name and value parts.

This code was copied from the splitHeader() method in the HttpMessageDecoder class, which is licensed under the Apache License version 2. (Original author: Trustin Lee.)

Author:
Trustin Lee, david varnes

Constructor Summary
HeaderParser()
           
 
Method Summary
static String[] splitHeader(String sb)
          Split a header in the form
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeaderParser

public HeaderParser()
Method Detail

splitHeader

public static String[] splitHeader(String sb)
Split a header in the form
   Header-Name: Some_header-value
 
into a String array.

Parameters:
sb - the string header to parse
Returns:
a String[] array with header name at 0 and header value at 1


Copyright © 2009-2010 david varnes. All Rights Reserved.