java.lang.Object
org.klomp.snark.web.BasicServlet.FileContent
org.klomp.snark.web.BasicServlet.LimitFileContent
All Implemented Interfaces:
BasicServlet.HttpContent
Enclosing class:
BasicServlet

private class BasicServlet.LimitFileContentextends BasicServlet.FileContent
File content with byte limit.
  • Field Details

    • _limit

      private final long _limit
      Most bytes to read, negative for all of them.
  • Constructor Details

    • LimitFileContent

      public LimitFileContent(File file, long limit)
      Create a content provider for the file, limited to the given byte count.
      Parameters:
      file - the file to serve, read only from its start
      limit - max bytes to serve
  • Method Details