| Constructor and Description |
|---|
RangeResults() |
| Modifier and Type | Method and Description |
|---|---|
static Result |
ofFile(File file)
Returns the file as a result considering "Range" header.
|
static Result |
ofFile(File file,
String fileName)
Returns the file as a result considering "Range" header.
|
static Result |
ofPath(Path path)
Returns the path as a result considering "Range" header.
|
static Result |
ofPath(Path path,
String fileName)
Returns the path as a result considering "Range" header.
|
static Result |
ofSource(Long entityLength,
Source<ByteString,?> source,
String fileName,
String contentType)
Returns the stream as a result considering "Range" header.
|
static Result |
ofStream(InputStream stream)
Returns the stream as a result considering "Range" header.
|
static Result |
ofStream(InputStream stream,
long contentLength)
Returns the stream as a result considering "Range" header.
|
static Result |
ofStream(InputStream stream,
long contentLength,
String filename)
Returns the stream as a result considering "Range" header.
|
static Result |
ofStream(InputStream stream,
long contentLength,
String filename,
String contentType)
Returns the stream as a result considering "Range" header.
|
public static Result ofStream(InputStream stream)
stream - the content streampublic static Result ofStream(InputStream stream, long contentLength)
stream - the content streamcontentLength - the entity lengthpublic static Result ofStream(InputStream stream, long contentLength, String filename)
stream - the content streamcontentLength - the entity lengthfilename - filename used at the Content-Disposition headerpublic static Result ofStream(InputStream stream, long contentLength, String filename, 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(Path path)
path - the content pathpublic static Result ofPath(Path path, String fileName)
path - the content pathfileName - filename used at the Content-Disposition header.public static Result ofFile(File file)
file - the content filepublic static Result ofFile(File file, String fileName)
file - the content filefileName - filename used at the Content-Disposition headerpublic static Result ofSource(Long entityLength, Source<ByteString,?> source, String fileName, String contentType)
entityLength - the entityLengthsource - source of the entityfileName - filename used at the Content-Disposition headercontentType - the content type for this stream