If you want to copy a specific chunk out of a file, the stream solutions will read the skipped bytes at the start of the file. The solution is to use a file descriptor:
RandomAccessFile file = new RandomAccessFile(localFile, "r");
file.seek(startPos);
IOUtils.copyLarge(new FileInputStream(file.getFD()),
resp.getOutputStream(), 0L, endPos - startPos + 1);