test_class.declarator: multipartHeadersPartParser
              = new MultipartHeadersPartParser(new HeadersParser())
test_class.modifier: private static
test_class.original_string: private static Parser<MultipartHeadersPart> multipartHeadersPartParser
              = new MultipartHeadersPartParser(new HeadersParser());
test_class.type: Parser<MultipartHeadersPart>
test_class.var_name: multipartHeadersPartParser
test_class.file: http/src/test/java/ro/polak/http/protocol/parser/impl/MultipartHeadersPartParserTest.java
test_class.identifier: MultipartHeadersPartParserTest
test_case.body: @Test(expected = MalformedInputException.class)
      public void shouldThrowMalformedInputExceptionForMissingClosing() throws MalformedInputException {
          multipartHeadersPartParser.parse("Content-Disposition: form-data; name=\"text");
      }
test_case.class_method_signature: MultipartHeadersPartParserTest.shouldThrowMalformedInputExceptionForMissingClosing()
test_case.full_signature: @Test(expected = MalformedInputException.class) public void shouldThrowMalformedInputExceptionForMissingClosing()
test_case.identifier: shouldThrowMalformedInputExceptionForMissingClosing
test_case.invocations: parse
test_case.modifiers: @Test(expected = MalformedInputException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldThrowMalformedInputExceptionForMissingClosing()
focal_class.declarator: NAME_START = "name=\""
focal_class.modifier: private static final
focal_class.original_string: private static final String NAME_START = "name=\"";
focal_class.type: String
focal_class.var_name: NAME_START
focal_class.declarator: FILENAME_START = "filename=\""
focal_class.modifier: private static final
focal_class.original_string: private static final String FILENAME_START = "filename=\"";
focal_class.type: String
focal_class.var_name: FILENAME_START
focal_class.declarator: parser
focal_class.modifier: private final
focal_class.original_string: private final HeadersParser parser;
focal_class.type: HeadersParser
focal_class.var_name: parser
focal_class.file: http/src/main/java/ro/polak/http/protocol/parser/impl/MultipartHeadersPartParser.java
focal_class.identifier: MultipartHeadersPartParser
focal_class.interfaces: implements Parser<MultipartHeadersPart>
focal_class.class_method_signature: MultipartHeadersPartParser.MultipartHeadersPartParser(final HeadersParser headersParser)
focal_class.full_signature: public  MultipartHeadersPartParser(final HeadersParser headersParser)
focal_class.identifier: MultipartHeadersPartParser
focal_class.modifiers: public
focal_class.parameters: (final HeadersParser headersParser)
focal_class.signature:  MultipartHeadersPartParser(final HeadersParser headersParser)
focal_class.class_method_signature: MultipartHeadersPartParser.parse(final String headersString)
focal_class.full_signature: @Override public MultipartHeadersPart parse(final String headersString)
focal_class.identifier: parse
focal_class.modifiers: @Override public
focal_class.parameters: (final String headersString)
focal_class.return: MultipartHeadersPart
focal_class.signature: MultipartHeadersPart parse(final String headersString)
focal_method.body: @Override
      public MultipartHeadersPart parse(final String headersString) throws MalformedInputException {
  
          MultipartHeadersPart part = new MultipartHeadersPart();
          Headers headers = parser.parse(headersString, false);
  
          String contentDispositionHeaderValue = headers.getHeader(Headers.HEADER_CONTENT_DISPOSITION);
          if (contentDispositionHeaderValue != null) {
              String contentDispositionLower = contentDispositionHeaderValue.toLowerCase();
  
              int nameStartPos = contentDispositionLower.indexOf(NAME_START);
              if (nameStartPos > -1) {
                  String name = contentDispositionHeaderValue.substring(nameStartPos + NAME_START.length());
                  int quotationMarkPosition = name.indexOf("\"");
                  if (quotationMarkPosition == -1) {
                      throw new MalformedInputException("Malformed header, unable to detect value beginning");
                  } else {
                      name = name.substring(0, quotationMarkPosition);
                  }
                  part.setName(name);
              }
  
  
              int fileNameStartPos = contentDispositionLower.indexOf(FILENAME_START);
              if (fileNameStartPos > -1) {
                  String fileName = contentDispositionHeaderValue.substring(fileNameStartPos + FILENAME_START.length());
                  int quotationMark2Position = fileName.indexOf("\"");
  
                  if (quotationMark2Position == -1) {
                      throw new MalformedInputException("Malformed header, unable to detect value end");
                  } else {
                      fileName = fileName.substring(0, quotationMark2Position);
                  }
  
                  part.setFileName(fileName);
              }
          }
          part.setContentType(headers.getHeader(Headers.HEADER_CONTENT_TYPE));
  
          return part;
      }
focal_method.class_method_signature: MultipartHeadersPartParser.parse(final String headersString)
focal_method.full_signature: @Override public MultipartHeadersPart parse(final String headersString)
focal_method.identifier: parse
focal_method.invocations: parse getHeader toLowerCase indexOf substring length indexOf substring setName indexOf substring length indexOf substring setFileName setContentType getHeader
focal_method.modifiers: @Override public
focal_method.parameters: (final String headersString)
focal_method.return: MultipartHeadersPart
focal_method.signature: MultipartHeadersPart parse(final String headersString)