Package org.eclipse.jgit.http.server
Class FileSender
- java.lang.Object
-
- org.eclipse.jgit.http.server.FileSender
-
final class FileSender extends java.lang.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.
-
-
Constructor Summary
Constructors Constructor Description FileSender(java.io.File path)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
close()
(package private) java.time.Instant
getLastModified()
private static java.util.Enumeration<java.lang.String>
getRange(javax.servlet.http.HttpServletRequest req)
(package private) java.lang.String
getTailChecksum()
private boolean
initRangeRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp)
(package private) void
serve(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp, boolean sendBody)
-
-
-
Method Detail
-
close
void close()
-
getLastModified
java.time.Instant getLastModified()
-
getTailChecksum
java.lang.String getTailChecksum() throws java.io.IOException
- Throws:
java.io.IOException
-
serve
void serve(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp, boolean sendBody) throws java.io.IOException
- Throws:
java.io.IOException
-
initRangeRequest
private boolean initRangeRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp) throws java.io.IOException
- Throws:
java.io.IOException
-
getRange
private static java.util.Enumeration<java.lang.String> getRange(javax.servlet.http.HttpServletRequest req)
-
-