Top Description Fields Constructors Methods
org.eclipse.jgit.http.server

pack-priv final Class FileSender

extends Object
Class Inheritance
Static Imports
jakarta.servlet.http.HttpServletResponse.SC_PARTIAL_CONTENT, .HttpServletResponse.SC_REQUESTED_RANGE_NOT_SATISFIABLE, org.eclipse.jgit.util.HttpSupport.HDR_ACCEPT_RANGES, .HttpSupport.HDR_CONTENT_LENGTH, .HttpSupport.HDR_CONTENT_RANGE, .HttpSupport.HDR_IF_RANGE, .HttpSupport.HDR_RANGE

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 Summary

Modifier and TypeField and Description
private long
private final long
private final Instant
private final File
private long
private final RandomAccessFile

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv Instant
private static Enumeration<String>
pack-priv String
private boolean
pack-priv void
serve(final HttpServletRequest req, final HttpServletResponse rsp, final boolean sendBody)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

endback to summary
private long end
fileLenback to summary
private final long fileLen
lastModifiedback to summary
private final Instant lastModified
pathback to summary
private final File path
posback to summary
private long pos
sourceback to summary
private final RandomAccessFile source

Constructor Detail

FileSenderback to summary
pack-priv FileSender(File path) throws FileNotFoundException

Method Detail

closeback to summary
pack-priv void close()
getLastModifiedback to summary
pack-priv Instant getLastModified()
getRangeback to summary
private static Enumeration<String> getRange(HttpServletRequest req)
getTailChecksumback to summary
pack-priv String getTailChecksum() throws IOException
initRangeRequestback to summary
private boolean initRangeRequest(final HttpServletRequest req, final HttpServletResponse rsp) throws IOException
serveback to summary
pack-priv void serve(final HttpServletRequest req, final HttpServletResponse rsp, final boolean sendBody) throws IOException