Class StreamingController
- java.lang.Object
-
- de.digitalcollections.streaming.euphoria.controller.StreamingController
-
@RestController public class StreamingController extends Object
Based on Omnifaces FileServlet.java (Apache License 2.0)This implementation properly deals with
ETag,If-None-MatchandIf-Modified-Sincecaching requests, hereby improving browser caching. This servlet also properly deals withRangeandIf-Rangeranging requests (RFC7233), which is required by most media players for proper audio/video streaming, and by webbrowsers and for a proper resume of an paused download, and by download accelerators to be able to request smaller parts simultaneously. This implementaion is ideal when you have large files like media files placed outside the web application and you can't use the default servlet.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classStreamingController.RangeThis class represents a byte range.
-
Constructor Summary
Constructors Constructor Description StreamingController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgetHead(String id, String extension, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)voidgetStream(String id, String extension, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
-
-
Method Detail
-
getHead
@RequestMapping(value="/stream/{id}/default.{extension}", method=HEAD) public void getHead(@PathVariable String id, @PathVariable String extension, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception- Throws:
Exception
-
-