| Modifier and Type | Class and Description |
|---|---|
static class |
RangeResults.SourceAndOffset |
static interface |
RangeResults.SourceFunction |
| Constructor and Description |
|---|
RangeResults() |
| Modifier and Type | Method and Description |
|---|---|
static Result |
ofFile(Http.Request request,
File file)
Returns the file as a result considering "Range" header.
|
static Result |
ofFile(Http.Request request,
File file,
FileMimeTypes fileMimeTypes)
Returns the file as a result considering "Range" header.
|
static Result |
ofFile(Http.Request request,
File file,
String fileName)
Returns the file as a result considering "Range" header.
|
static Result |
ofFile(Http.Request request,
File file,
String fileName,
FileMimeTypes fileMimeTypes)
Returns the file as a result considering "Range" header.
|
static Result |
ofPath(Http.Request request,
Path path)
Returns the path as a result considering "Range" header.
|
static Result |
ofPath(Http.Request request,
Path path,
FileMimeTypes fileMimeTypes)
Returns the path as a result considering "Range" header.
|
static Result |
ofPath(Http.Request request,
Path path,
String fileName)
Returns the path as a result considering "Range" header.
|
static Result |
ofPath(Http.Request request,
Path path,
String fileName,
FileMimeTypes fileMimeTypes)
Returns the path as a result considering "Range" header.
|
static Result |
ofSource(Http.Request request,
Long entityLength,
RangeResults.SourceFunction getSource,
String fileName,
String contentType) |
static Result |
ofSource(Http.Request request,
Long entityLength,
akka.stream.javadsl.Source<akka.util.ByteString,?> source,
String fileName,
String contentType)
Returns the stream as a result considering "Range" header.
|
static Result |
ofStream(Http.Request request,
InputStream stream)
Returns the stream as a result considering "Range" header.
|
static Result |
ofStream(Http.Request request,
InputStream stream,
long contentLength)
Returns the stream as a result considering "Range" header.
|
static Result |
ofStream(Http.Request request,
InputStream stream,
long contentLength,
String filename)
Returns the stream as a result considering "Range" header.
|
static Result |
ofStream(Http.Request request,
InputStream stream,
long contentLength,
String filename,
String contentType)
Returns the stream as a result considering "Range" header.
|
public static Result ofStream(Http.Request request, InputStream stream)
request - the request from which to retrieve the range header.stream - the content streampublic static Result ofStream(Http.Request request, InputStream stream, long contentLength)
request - the request from which to retrieve the range header.stream - the content streamcontentLength - the entity lengthpublic static Result ofStream(Http.Request request, InputStream stream, long contentLength, String filename)
request - the request from which to retrieve the range header.stream - the content streamcontentLength - the entity lengthfilename - filename used at the Content-Disposition headerpublic static Result ofStream(Http.Request request, InputStream stream, long contentLength, String filename, String contentType)
request - the request from which to retrieve the range header.stream - the content streamcontentLength - the entity lengthfilename - filename used at the Content-Disposition headercontentType - the content type for this streampublic static Result ofPath(Http.Request request, Path path)
request - the request from which to retrieve the range header.path - the content pathpublic static Result ofPath(Http.Request request, Path path, FileMimeTypes fileMimeTypes)
request - the request from which to retrieve the range header.path - the content pathfileMimeTypes - Used for file type mapping.public static Result ofPath(Http.Request request, Path path, String fileName)
request - the request from which to retrieve the range header.path - the content pathfileName - filename used at the Content-Disposition header.public static Result ofPath(Http.Request request, Path path, String fileName, FileMimeTypes fileMimeTypes)
request - the request from which to retrieve the range header.path - the content pathfileName - filename used at the Content-Disposition header.fileMimeTypes - Used for file type mapping.public static Result ofFile(Http.Request request, File file)
request - the request from which to retrieve the range header.file - the content filepublic static Result ofFile(Http.Request request, File file, FileMimeTypes fileMimeTypes)
request - the request from which to retrieve the range header.file - the content filefileMimeTypes - Used for file type mapping.public static Result ofFile(Http.Request request, File file, String fileName)
request - the request from which to retrieve the range header.file - the content filefileName - filename used at the Content-Disposition headerpublic static Result ofFile(Http.Request request, File file, String fileName, FileMimeTypes fileMimeTypes)
request - the request from which to retrieve the range header.file - the content filefileName - filename used at the Content-Disposition headerfileMimeTypes - Used for file type mapping.public static Result ofSource(Http.Request request, Long entityLength, akka.stream.javadsl.Source<akka.util.ByteString,?> source, String fileName, String contentType)
request - the request from which to retrieve the range header.entityLength - the entityLengthsource - source of the entityfileName - filename used at the Content-Disposition headercontentType - the content type for this stream@ApiMayChange public static Result ofSource(Http.Request request, Long entityLength, RangeResults.SourceFunction getSource, String fileName, String contentType)