public InputStreamWrapper(HttpResult res, long off, long endoff) {
            this.in = res.in;
            offset = off;
            this.endoff = endoff;
            this.res = res;
            for(String header : res.headers){
                if(header.toLowerCase().trim().startsWith("accept-ranges:") &&
                        header.substring("accept-ranges:".length()).trim().equals("bytes")){
                    
                    acceptRanges = true;
                    break;
                }
            }
            
        }