public IRandomAccessSource createRanged(IRandomAccessSource source, long[] ranges) throws java.io.IOException { IRandomAccessSource[] sources = new IRandomAccessSource[ranges.length/2]; for(int i = 0; i < ranges.length; i+=2){ sources[i/2] = new WindowRandomAccessSource(source, ranges[i], ranges[i+1]); } return new GroupedRandomAccessSource(sources); }
public IRandomAccessSource createRanged(IRandomAccessSource source, long[] ranges) throws java.io.IOException { IRandomAccessSource[] sources = new IRandomAccessSource[ranges.length/2]; for(int i = 0; i < ranges.length; i+=2){ sources[i/2] = new WindowRandomAccessSource(source, ranges[i], ranges[i+1]); } return new GroupedRandomAccessSource(sources); }