test_class.declarator: BOUNDARY = "------------BOUNDARY"
test_class.modifier: private static final
test_class.original_string: private static final String BOUNDARY = "------------BOUNDARY";
test_class.type: String
test_class.var_name: BOUNDARY
test_class.declarator: TEMPORARY_UPLOADS_DIRECTORY
              = System.getProperty("java.io.tmpdir") + "/"
test_class.modifier: private static final
test_class.original_string: private static final String TEMPORARY_UPLOADS_DIRECTORY
              = System.getProperty("java.io.tmpdir") + "/";
test_class.type: String
test_class.var_name: TEMPORARY_UPLOADS_DIRECTORY
test_class.declarator: PARSER = new MultipartHeadersPartParser(
              new HeadersParser()
      )
test_class.modifier: private static final
test_class.original_string: private static final Parser<MultipartHeadersPart> PARSER = new MultipartHeadersPartParser(
              new HeadersParser()
      );
test_class.type: Parser<MultipartHeadersPart>
test_class.var_name: PARSER
test_class.file: http/src/test/java/ro/polak/http/MultipartRequestHandlerTest.java
test_class.identifier: MultipartRequestHandlerTest
test_case.body: @Test(expected = IllegalStateException.class)
      public void shouldBeHandledOnceOnly() throws MalformedInputException {
          String data = new MultipartInputBuilder(BOUNDARY)
                  .withField("field_1", "A123")
                  .withField("field_2", "B123")
                  .withField("field_3", "C123")
                  .build();
  
          MultipartRequestHandler mrh = new MultipartRequestHandler(PARSER, getStreamOutOfString(data),
                  data.length(), BOUNDARY, TEMPORARY_UPLOADS_DIRECTORY, 2048);
  
          try {
              mrh.handle();
              mrh.handle();
          } catch (IOException e) {
              fail("Should not throw IOException: " + e.getMessage());
          }
      }
test_case.class_method_signature: MultipartRequestHandlerTest.shouldBeHandledOnceOnly()
test_case.full_signature: @Test(expected = IllegalStateException.class) public void shouldBeHandledOnceOnly()
test_case.identifier: shouldBeHandledOnceOnly
test_case.invocations: build withField withField withField getStreamOutOfString length handle handle fail getMessage
test_case.modifiers: @Test(expected = IllegalStateException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldBeHandledOnceOnly()
focal_class.declarator: NEW_LINE = "\r\n"
focal_class.modifier: private static final
focal_class.original_string: private static final String NEW_LINE = "\r\n";
focal_class.type: String
focal_class.var_name: NEW_LINE
focal_class.declarator: BOUNDARY_BEGIN_MARK = "--"
focal_class.modifier: private static final
focal_class.original_string: private static final String BOUNDARY_BEGIN_MARK = "--";
focal_class.type: String
focal_class.var_name: BOUNDARY_BEGIN_MARK
focal_class.declarator: HEADERS_DELIMINATOR = NEW_LINE + NEW_LINE
focal_class.modifier: private static final
focal_class.original_string: private static final String HEADERS_DELIMINATOR = NEW_LINE + NEW_LINE;
focal_class.type: String
focal_class.var_name: HEADERS_DELIMINATOR
focal_class.declarator: in
focal_class.modifier: private final
focal_class.original_string: private final InputStream in;
focal_class.type: InputStream
focal_class.var_name: in
focal_class.declarator: multipartHeadersPartParser
focal_class.modifier: private final
focal_class.original_string: private final Parser<MultipartHeadersPart> multipartHeadersPartParser;
focal_class.type: Parser<MultipartHeadersPart>
focal_class.var_name: multipartHeadersPartParser
focal_class.declarator: expectedPostLength
focal_class.modifier: private final
focal_class.original_string: private final int expectedPostLength;
focal_class.type: int
focal_class.var_name: expectedPostLength
focal_class.declarator: bufferLength
focal_class.modifier: private final
focal_class.original_string: private final int bufferLength;
focal_class.type: int
focal_class.var_name: bufferLength
focal_class.declarator: temporaryUploadsDirectory
focal_class.modifier: private final
focal_class.original_string: private final String temporaryUploadsDirectory;
focal_class.type: String
focal_class.var_name: temporaryUploadsDirectory
focal_class.declarator: post
focal_class.modifier: private final
focal_class.original_string: private final Map<String, String> post;
focal_class.type: Map<String, String>
focal_class.var_name: post
focal_class.declarator: currentFile
focal_class.modifier: private
focal_class.original_string: private File currentFile;
focal_class.type: File
focal_class.var_name: currentFile
focal_class.declarator: fileOutputStream
focal_class.modifier: private
focal_class.original_string: private FileOutputStream fileOutputStream;
focal_class.type: FileOutputStream
focal_class.var_name: fileOutputStream
focal_class.declarator: allBytesRead = 0
focal_class.modifier: private
focal_class.original_string: private int allBytesRead = 0;
focal_class.type: int
focal_class.var_name: allBytesRead
focal_class.declarator: headersStringBuffered
focal_class.modifier: private
focal_class.original_string: private StringBuilder headersStringBuffered;
focal_class.type: StringBuilder
focal_class.var_name: headersStringBuffered
focal_class.declarator: valueStringBuffered
focal_class.modifier: private
focal_class.original_string: private StringBuilder valueStringBuffered;
focal_class.type: StringBuilder
focal_class.var_name: valueStringBuffered
focal_class.declarator: endBoundary
focal_class.modifier: private
focal_class.original_string: private String endBoundary;
focal_class.type: String
focal_class.var_name: endBoundary
focal_class.declarator: beginBoundary
focal_class.modifier: private
focal_class.original_string: private String beginBoundary;
focal_class.type: String
focal_class.var_name: beginBoundary
focal_class.declarator: multipartHeadersPart
focal_class.modifier: private
focal_class.original_string: private MultipartHeadersPart multipartHeadersPart;
focal_class.type: MultipartHeadersPart
focal_class.var_name: multipartHeadersPart
focal_class.declarator: uploadedFiles
focal_class.modifier: private
focal_class.original_string: private Collection<UploadedFile> uploadedFiles;
focal_class.type: Collection<UploadedFile>
focal_class.var_name: uploadedFiles
focal_class.declarator: wasHandledBefore
focal_class.modifier: private
focal_class.original_string: private boolean wasHandledBefore;
focal_class.type: boolean
focal_class.var_name: wasHandledBefore
focal_class.file: http/src/main/java/ro/polak/http/MultipartRequestHandler.java
focal_class.identifier: MultipartRequestHandler
focal_class.class_method_signature: MultipartRequestHandler.MultipartRequestHandler(final Parser<MultipartHeadersPart> multipartHeadersPartParser,
                                     final InputStream in, final int expectedPostLength,
                                     final String boundary, final String temporaryUploadsDirectory,
                                     final int bufferLength)
focal_class.full_signature: public  MultipartRequestHandler(final Parser<MultipartHeadersPart> multipartHeadersPartParser,
                                     final InputStream in, final int expectedPostLength,
                                     final String boundary, final String temporaryUploadsDirectory,
                                     final int bufferLength)
focal_class.identifier: MultipartRequestHandler
focal_class.modifiers: public
focal_class.parameters: (final Parser<MultipartHeadersPart> multipartHeadersPartParser,
                                     final InputStream in, final int expectedPostLength,
                                     final String boundary, final String temporaryUploadsDirectory,
                                     final int bufferLength)
focal_class.signature:  MultipartRequestHandler(final Parser<MultipartHeadersPart> multipartHeadersPartParser,
                                     final InputStream in, final int expectedPostLength,
                                     final String boundary, final String temporaryUploadsDirectory,
                                     final int bufferLength)
focal_class.class_method_signature: MultipartRequestHandler.handle()
focal_class.full_signature: public void handle()
focal_class.identifier: handle
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void handle()
focal_class.class_method_signature: MultipartRequestHandler.getPost()
focal_class.full_signature: public Map<String, String> getPost()
focal_class.identifier: getPost
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> getPost()
focal_class.class_method_signature: MultipartRequestHandler.getUploadedFiles()
focal_class.full_signature: public Collection<UploadedFile> getUploadedFiles()
focal_class.identifier: getUploadedFiles
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Collection<UploadedFile>
focal_class.signature: Collection<UploadedFile> getUploadedFiles()
focal_class.class_method_signature: MultipartRequestHandler.skipToTheFirstPart()
focal_class.full_signature: private void skipToTheFirstPart()
focal_class.identifier: skipToTheFirstPart
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void skipToTheFirstPart()
focal_class.class_method_signature: MultipartRequestHandler.handleBody()
focal_class.full_signature: private void handleBody()
focal_class.identifier: handleBody
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void handleBody()
focal_class.class_method_signature: MultipartRequestHandler.pushBufferToDestination(final byte[] bytes,
                                           final int start,
                                           final int end,
                                           final boolean isHeadersReadingState)
focal_class.full_signature: private void pushBufferToDestination(final byte[] bytes,
                                           final int start,
                                           final int end,
                                           final boolean isHeadersReadingState)
focal_class.identifier: pushBufferToDestination
focal_class.modifiers: private
focal_class.parameters: (final byte[] bytes,
                                           final int start,
                                           final int end,
                                           final boolean isHeadersReadingState)
focal_class.return: void
focal_class.signature: void pushBufferToDestination(final byte[] bytes,
                                           final int start,
                                           final int end,
                                           final boolean isHeadersReadingState)
focal_class.class_method_signature: MultipartRequestHandler.pushBufferOnEndOfState(final byte[] bytes,
                                            final int start,
                                            final int end,
                                            final boolean isHeadersReadingState)
focal_class.full_signature: private String pushBufferOnEndOfState(final byte[] bytes,
                                            final int start,
                                            final int end,
                                            final boolean isHeadersReadingState)
focal_class.identifier: pushBufferOnEndOfState
focal_class.modifiers: private
focal_class.parameters: (final byte[] bytes,
                                            final int start,
                                            final int end,
                                            final boolean isHeadersReadingState)
focal_class.return: String
focal_class.signature: String pushBufferOnEndOfState(final byte[] bytes,
                                            final int start,
                                            final int end,
                                            final boolean isHeadersReadingState)
focal_class.class_method_signature: MultipartRequestHandler.pushBufferOnEndOfStateBody(final byte[] bytes, final int start, final int end)
focal_class.full_signature: private void pushBufferOnEndOfStateBody(final byte[] bytes, final int start, final int end)
focal_class.identifier: pushBufferOnEndOfStateBody
focal_class.modifiers: private
focal_class.parameters: (final byte[] bytes, final int start, final int end)
focal_class.return: void
focal_class.signature: void pushBufferOnEndOfStateBody(final byte[] bytes, final int start, final int end)
focal_class.class_method_signature: MultipartRequestHandler.getMultipartFile()
focal_class.full_signature: private UploadedFile getMultipartFile()
focal_class.identifier: getMultipartFile
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: UploadedFile
focal_class.signature: UploadedFile getMultipartFile()
focal_class.class_method_signature: MultipartRequestHandler.pushBufferOnEndOfStateHeaders(final byte[] bytes, final int start, final int end)
focal_class.full_signature: private void pushBufferOnEndOfStateHeaders(final byte[] bytes, final int start, final int end)
focal_class.identifier: pushBufferOnEndOfStateHeaders
focal_class.modifiers: private
focal_class.parameters: (final byte[] bytes, final int start, final int end)
focal_class.return: void
focal_class.signature: void pushBufferOnEndOfStateHeaders(final byte[] bytes, final int start, final int end)
focal_method.body: public void handle() throws IOException, MalformedInputException {
          if (wasHandledBefore) {
              throw new IllegalStateException("Handle method was not expected to be called more than once");
          }
          wasHandledBefore = true;
  
          skipToTheFirstPart();
          handleBody();
      }
focal_method.class_method_signature: MultipartRequestHandler.handle()
focal_method.full_signature: public void handle()
focal_method.identifier: handle
focal_method.invocations: skipToTheFirstPart handleBody
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void handle()