package org.broad.tribble.util;

import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;

/**
 * @author jrobinso
 * @date Nov 30, 2009
 */
public class SeekableStreamFactory {

    public static SeekableStream getStreamFor(String path) throws IOException {
	// todo -- add support for SeekableBlockInputStream
        return path.startsWith("http:") || path.startsWith("https:") ?
                new SeekableHTTPStream(new URL(path)) :
                new SeekableFileStream(new File(path));
    }


}
