test_class.file: rawhttp-cli/src/test/java/rawhttp/cli/CliServerRouterTest.java
test_class.identifier: CliServerRouterTest
test_case.body: @Test
      public void canTellIfFileIsModifiedSinceDate() {
          assertFalse(CliServerRouter.isModified(0L, "Sat, 29 Oct 1994 19:43:31 GMT"));
  
          assertTrue(CliServerRouter.isModified(
                  Instant.parse("2007-12-03T10:15:30.00Z").toEpochMilli(),
                  "Sat, 29 Oct 1994 19:43:31 GMT"));
  
          assertFalse(CliServerRouter.isModified(
                  Instant.parse("1994-10-29T19:43:31.00Z").toEpochMilli(),
                  "Sat, 29 Oct 1994 19:43:31 GMT"));
  
          assertTrue(CliServerRouter.isModified(
                  Instant.parse("1994-10-29T19:43:31.01Z").toEpochMilli(),
                  "Sat, 29 Oct 1994 19:43:31 GMT"));
      }
test_case.class_method_signature: CliServerRouterTest.canTellIfFileIsModifiedSinceDate()
test_case.full_signature: @Test public void canTellIfFileIsModifiedSinceDate()
test_case.identifier: canTellIfFileIsModifiedSinceDate
test_case.invocations: assertFalse isModified assertTrue isModified toEpochMilli parse assertFalse isModified toEpochMilli parse assertTrue isModified toEpochMilli parse
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void canTellIfFileIsModifiedSinceDate()
focal_class.declarator: mimeByFileExtension
focal_class.modifier: static final
focal_class.original_string: static final Map<String, String> mimeByFileExtension;
focal_class.type: Map<String, String>
focal_class.var_name: mimeByFileExtension
focal_class.declarator: DIR_BACK_PATTERN = Pattern.quote("../")
focal_class.modifier: public static final
focal_class.original_string: public static final String DIR_BACK_PATTERN = Pattern.quote("../");
focal_class.type: String
focal_class.var_name: DIR_BACK_PATTERN
focal_class.declarator: fileLocator
focal_class.modifier: private final
focal_class.original_string: private final FileLocator fileLocator;
focal_class.type: FileLocator
focal_class.var_name: fileLocator
focal_class.declarator: pathReader
focal_class.modifier: private final
focal_class.original_string: private final PathReader pathReader;
focal_class.type: PathReader
focal_class.var_name: pathReader
focal_class.file: rawhttp-cli/src/main/java/rawhttp/cli/CliServerRouter.java
focal_class.identifier: CliServerRouter
focal_class.interfaces: implements Router
focal_class.class_method_signature: CliServerRouter.CliServerRouter(File rootDir, String rootPath)
focal_class.full_signature:   CliServerRouter(File rootDir, String rootPath)
focal_class.identifier: CliServerRouter
focal_class.parameters: (File rootDir, String rootPath)
focal_class.signature:  CliServerRouter(File rootDir, String rootPath)
focal_class.class_method_signature: CliServerRouter.CliServerRouter(File rootDir, String rootPath, Properties mediaTypes)
focal_class.full_signature:   CliServerRouter(File rootDir, String rootPath, Properties mediaTypes)
focal_class.identifier: CliServerRouter
focal_class.parameters: (File rootDir, String rootPath, Properties mediaTypes)
focal_class.signature:  CliServerRouter(File rootDir, String rootPath, Properties mediaTypes)
focal_class.class_method_signature: CliServerRouter.CliServerRouter(File rootDir, String rootPath, Map<String, String> mimeMapping)
focal_class.full_signature: private  CliServerRouter(File rootDir, String rootPath, Map<String, String> mimeMapping)
focal_class.identifier: CliServerRouter
focal_class.modifiers: private
focal_class.parameters: (File rootDir, String rootPath, Map<String, String> mimeMapping)
focal_class.signature:  CliServerRouter(File rootDir, String rootPath, Map<String, String> mimeMapping)
focal_class.class_method_signature: CliServerRouter.convertToMap(Properties mediaTypes)
focal_class.full_signature: private static Map<String, String> convertToMap(Properties mediaTypes)
focal_class.identifier: convertToMap
focal_class.modifiers: private static
focal_class.parameters: (Properties mediaTypes)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> convertToMap(Properties mediaTypes)
focal_class.class_method_signature: CliServerRouter.route(RawHttpRequest request)
focal_class.full_signature: @Override public Optional<RawHttpResponse<?>> route(RawHttpRequest request)
focal_class.identifier: route
focal_class.modifiers: @Override public
focal_class.parameters: (RawHttpRequest request)
focal_class.return: Optional<RawHttpResponse<?>>
focal_class.signature: Optional<RawHttpResponse<?>> route(RawHttpRequest request)
focal_class.class_method_signature: CliServerRouter.serveFile(RawHttpRequest request, FileResult fileResult)
focal_class.full_signature: private RawHttpResponse<Void> serveFile(RawHttpRequest request, FileResult fileResult)
focal_class.identifier: serveFile
focal_class.modifiers: private
focal_class.parameters: (RawHttpRequest request, FileResult fileResult)
focal_class.return: RawHttpResponse<Void>
focal_class.signature: RawHttpResponse<Void> serveFile(RawHttpRequest request, FileResult fileResult)
focal_class.class_method_signature: CliServerRouter.isModified(long fileLastModified, String since)
focal_class.full_signature: static boolean isModified(long fileLastModified, String since)
focal_class.identifier: isModified
focal_class.modifiers: static
focal_class.parameters: (long fileLastModified, String since)
focal_class.return: boolean
focal_class.signature: boolean isModified(long fileLastModified, String since)
focal_method.body: static boolean isModified(long fileLastModified, String since) {
          ZonedDateTime sinceDate;
          try {
              sinceDate = ZonedDateTime.from(DateTimeFormatter.RFC_1123_DATE_TIME.parse(since));
          } catch (Exception e) {
              return true;
          }
          return fileLastModified > sinceDate.toInstant().toEpochMilli();
      }
focal_method.class_method_signature: CliServerRouter.isModified(long fileLastModified, String since)
focal_method.full_signature: static boolean isModified(long fileLastModified, String since)
focal_method.identifier: isModified
focal_method.invocations: from parse toEpochMilli toInstant
focal_method.modifiers: static
focal_method.parameters: (long fileLastModified, String since)
focal_method.return: boolean
focal_method.signature: boolean isModified(long fileLastModified, String since)