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.
|
static Result |
ofStream(java.io.InputStream stream)
Returns the stream as a result considering "Range" header.
|
static Result |
ofStream(java.io.InputStream stream,
long contentLength)
Returns the stream as a result considering "Range" header.
|
static Result |
ofStream(java.io.InputStream stream,
long contentLength,
java.lang.String filename)
Returns the stream as a result considering "Range" header.
|
static Result |
ofStream(java.io.InputStream stream,
long contentLength,
java.lang.String filename,
java.lang.String contentType)
Returns the stream as a result considering "Range" header.
|
public static Result ofStream(java.io.InputStream stream)
stream
- the content streampublic static Result ofStream(java.io.InputStream stream, long contentLength)
stream
- the content streamcontentLength
- the entity lengthpublic static Result ofStream(java.io.InputStream stream, long contentLength, java.lang.String filename)
stream
- the content streamcontentLength
- the entity lengthfilename
- filename used at the Content-Disposition headerpublic static Result ofStream(java.io.InputStream stream, long contentLength, java.lang.String filename, java.lang.String contentType)
stream
- the content streamcontentLength
- the entity lengthfilename
- filename used at the Content-Disposition headercontentType
- the content type for this streampublic 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