I have a Java Servlet that loads File objects from the filesystem and serves them to a client-side javascript web player. Those files are video/mp4 type. When the web client-side javascript player requests a section of the video that is different from the start, it sends a request for partial content to the web server with the header Range. For example
Range: bytes = 500-900/1000
How can I properly select the section of the File object corresponding to that range and what headers should I put in my response so as it is valid for use ?