test_class.declarator: headerParameterParser
test_class.modifier: private
test_class.original_string: private HeaderParameterParser headerParameterParser;
test_class.type: HeaderParameterParser
test_class.var_name: headerParameterParser
test_class.file: everrest-core/src/test/java/org/everrest/core/impl/header/HeaderParameterParserTest.java
test_class.identifier: HeaderParameterParserTest
test_case.body: @Test(expected = ParseException.class)
      public void throwsExceptionWhenStringContainsIllegalCharacter() throws Exception {
          headerParameterParser.parse("text/plain;fo[o=\"bar\"");
      }
test_case.class_method_signature: HeaderParameterParserTest.throwsExceptionWhenStringContainsIllegalCharacter()
test_case.full_signature: @Test(expected = ParseException.class) public void throwsExceptionWhenStringContainsIllegalCharacter()
test_case.identifier: throwsExceptionWhenStringContainsIllegalCharacter
test_case.invocations: parse
test_case.modifiers: @Test(expected = ParseException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void throwsExceptionWhenStringContainsIllegalCharacter()
focal_class.declarator: PARAMS_SEPARATOR  = ';'
focal_class.modifier: private static final
focal_class.original_string: private static final char   PARAMS_SEPARATOR  = ';';
focal_class.type: char
focal_class.var_name: PARAMS_SEPARATOR
focal_class.declarator: NAME_TERMINATORS  = "=;"
focal_class.modifier: private static final
focal_class.original_string: private static final String NAME_TERMINATORS  = "=;";
focal_class.type: String
focal_class.var_name: NAME_TERMINATORS
focal_class.declarator: VALUE_TERMINATORS = ";"
focal_class.modifier: private static final
focal_class.original_string: private static final String VALUE_TERMINATORS = ";";
focal_class.type: String
focal_class.var_name: VALUE_TERMINATORS
focal_class.declarator: pos
focal_class.modifier: private
focal_class.original_string: private int pos;
focal_class.type: int
focal_class.var_name: pos
focal_class.declarator: source
focal_class.modifier: private
focal_class.original_string: private String source;
focal_class.type: String
focal_class.var_name: source
focal_class.declarator: sourceLength
focal_class.modifier: private
focal_class.original_string: private int sourceLength;
focal_class.type: int
focal_class.var_name: sourceLength
focal_class.file: everrest-core/src/main/java/org/everrest/core/impl/header/HeaderParameterParser.java
focal_class.identifier: HeaderParameterParser
focal_class.class_method_signature: HeaderParameterParser.parse(String header)
focal_class.full_signature: public Map<String, String> parse(String header)
focal_class.identifier: parse
focal_class.modifiers: public
focal_class.parameters: (String header)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> parse(String header)
focal_class.class_method_signature: HeaderParameterParser.hasRemainingChars()
focal_class.full_signature: private boolean hasRemainingChars()
focal_class.identifier: hasRemainingChars
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean hasRemainingChars()
focal_class.class_method_signature: HeaderParameterParser.init(String header)
focal_class.full_signature: private void init(String header)
focal_class.identifier: init
focal_class.modifiers: private
focal_class.parameters: (String header)
focal_class.return: void
focal_class.signature: void init(String header)
focal_class.class_method_signature: HeaderParameterParser.readQuotedString()
focal_class.full_signature: private String readQuotedString()
focal_class.identifier: readQuotedString
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String readQuotedString()
focal_class.class_method_signature: HeaderParameterParser.readToken(String terminators)
focal_class.full_signature: private String readToken(String terminators)
focal_class.identifier: readToken
focal_class.modifiers: private
focal_class.parameters: (String terminators)
focal_class.return: String
focal_class.signature: String readToken(String terminators)
focal_class.class_method_signature: HeaderParameterParser.readToken(int startOfToken, int endOfToken)
focal_class.full_signature: private String readToken(int startOfToken, int endOfToken)
focal_class.identifier: readToken
focal_class.modifiers: private
focal_class.parameters: (int startOfToken, int endOfToken)
focal_class.return: String
focal_class.signature: String readToken(int startOfToken, int endOfToken)
focal_method.body: public Map<String, String> parse(String header) throws ParseException {
          init(header);
  
          Map<String, String> parameters = new HashMap<>();
  
          pos++; // skip first ';'
          while (hasRemainingChars()) {
              String name = readToken(NAME_TERMINATORS);
              String value = null;
              if (charAtIs(source, pos, '=')) {
                  pos++; // skip '='
                  if (charAtIs(source, pos, '"')) {
                      value = readQuotedString();
                  } else if (hasRemainingChars()) {
                      value = readToken(VALUE_TERMINATORS);
                  }
              }
  
              if (charAtIs(source, pos, PARAMS_SEPARATOR)) {
                  pos++; // skip ';'
              }
  
              if (!isNullOrEmpty(name)) {
                  parameters.put(name, value);
              }
  
          }
          return parameters;
      }
focal_method.class_method_signature: HeaderParameterParser.parse(String header)
focal_method.full_signature: public Map<String, String> parse(String header)
focal_method.identifier: parse
focal_method.invocations: init hasRemainingChars readToken charAtIs charAtIs readQuotedString hasRemainingChars readToken charAtIs isNullOrEmpty put
focal_method.modifiers: public
focal_method.parameters: (String header)
focal_method.return: Map<String, String>
focal_method.signature: Map<String, String> parse(String header)