Class FileSender

java.lang.Object
org.eclipse.jgit.http.server.FileSender

final class FileSender extends Object
Dumps a file over HTTP GET (or its information via HEAD).

Supports a single byte range requested via Range HTTP header. This feature supports a dumb client to resume download of a larger object file.

  • Field Details

    • path

      private final File path
    • source

      private final RandomAccessFile source
    • lastModified

      private final Instant lastModified
    • fileLen

      private final long fileLen
    • pos

      private long pos
    • end

      private long end
  • Constructor Details

  • Method Details

    • close

      void close()
    • getLastModified

      Instant getLastModified()
    • getTailChecksum

      String getTailChecksum() throws IOException
      Throws:
      IOException
    • serve

      void serve(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp, boolean sendBody) throws IOException
      Throws:
      IOException
    • initRangeRequest

      private boolean initRangeRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp) throws IOException
      Throws:
      IOException
    • getRange

      private static Enumeration<String> getRange(javax.servlet.http.HttpServletRequest req)