public class RangeResults
extends java.lang.Object
| Constructor and Description |
|---|
RangeResults() |
| Modifier and Type | Method and Description |
|---|---|
static Result |
ofFile(java.io.File file)
Returns the file as a result considering "Range" header.
|
static Result |
ofFile(java.io.File file,
java.lang.String fileName)
Returns the file as a result considering "Range" header.
|
static Result |
ofPath(java.nio.file.Path path)
Returns the path as a result considering "Range" header.
|
static Result |
ofPath(java.nio.file.Path path,
java.lang.String fileName)
Returns the path as a result considering "Range" header.
|
static Result |
ofSource(java.lang.Long entityLength,
akka.stream.javadsl.Source<akka.util.ByteString,?> source,
java.lang.String fileName,
java.lang.String contentType)
Returns the stream as a result considering "Range" header.
|
public static Result ofPath(java.nio.file.Path path)
path - the content pathpublic static Result ofPath(java.nio.file.Path path, java.lang.String fileName)
path - the content pathfileName - filename used at the Content-Disposition header.public static Result ofFile(java.io.File file)
file - the content filepublic static Result ofFile(java.io.File file, java.lang.String fileName)
file - the content filefileName - filename used at the Content-Disposition headerpublic static Result ofSource(java.lang.Long entityLength, akka.stream.javadsl.Source<akka.util.ByteString,?> source, java.lang.String fileName, java.lang.String contentType)
entityLength - the entityLengthsource - source of the entityfileName - filename used at the Content-Disposition headercontentType - the content type for this stream