Package htsjdk.samtools
Class SamInputResource
- java.lang.Object
-
- htsjdk.samtools.SamInputResource
-
public class SamInputResource extends Object
Describes a SAM-like resource, including its data (where the records are), and optionally an index. A data or index source may originate from aFile,InputStream,URL, orSeekableStream; look for the appropriate overload forhtsjdk.samtools.SamInputResource#of().
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SamInputResourceindex(SeekableStream seekableStream)Updates the index to point at the provided resource, then returns itself.SamInputResourceindex(File file)Updates the index to point at the provided resource, then returns itself.SamInputResourceindex(InputStream inputStream)Updates the index to point at the provided resource, then returns itself.SamInputResourceindex(URL url)Updates the index to point at the provided resource, then returns itself.SamInputResourceindex(Path path)Updates the index to point at the provided resource, then returns itself.SamInputResourceindex(Path path, Function<SeekableByteChannel,SeekableByteChannel> wrapper)Updates the index to point at the provided resource, with the provided wrapper, then returns itself.static SamInputResourceof(SeekableStream seekableStream)Creates aSamInputResourcereading from the provided resource, with no index.static SamInputResourceof(SRAAccession acc)static SamInputResourceof(File file)Creates aSamInputResourcereading from the provided resource, with no index.static SamInputResourceof(InputStream inputStream)Creates aSamInputResourcereading from the provided resource, with no index.static SamInputResourceof(String string)Creates aSamInputResourcefrom a string specifying *either* a url or a file pathstatic SamInputResourceof(URL url)Creates aSamInputResourcereading from the provided resource, with no index.static SamInputResourceof(Path path)Creates aSamInputResourcereading from the provided resource, with no index.static SamInputResourceof(Path path, Function<SeekableByteChannel,SeekableByteChannel> wrapper)Creates aSamInputResourcereading from the provided resource, with no index, and with a wrapper to apply to the SeekableByteChannel for custom prefetching/buffering.StringtoString()
-
-
-
Method Detail
-
of
public static SamInputResource of(File file)
Creates aSamInputResourcereading from the provided resource, with no index.
-
of
public static SamInputResource of(Path path)
Creates aSamInputResourcereading from the provided resource, with no index.
-
of
public static SamInputResource of(Path path, Function<SeekableByteChannel,SeekableByteChannel> wrapper)
Creates aSamInputResourcereading from the provided resource, with no index, and with a wrapper to apply to the SeekableByteChannel for custom prefetching/buffering.
-
of
public static SamInputResource of(InputStream inputStream)
Creates aSamInputResourcereading from the provided resource, with no index.
-
of
public static SamInputResource of(URL url)
Creates aSamInputResourcereading from the provided resource, with no index.
-
of
public static SamInputResource of(SeekableStream seekableStream)
Creates aSamInputResourcereading from the provided resource, with no index.
-
of
public static SamInputResource of(SRAAccession acc)
-
of
public static SamInputResource of(String string)
Creates aSamInputResourcefrom a string specifying *either* a url or a file path
-
index
public SamInputResource index(File file)
Updates the index to point at the provided resource, then returns itself.
-
index
public SamInputResource index(Path path)
Updates the index to point at the provided resource, then returns itself.
-
index
public SamInputResource index(Path path, Function<SeekableByteChannel,SeekableByteChannel> wrapper)
Updates the index to point at the provided resource, with the provided wrapper, then returns itself.
-
index
public SamInputResource index(InputStream inputStream)
Updates the index to point at the provided resource, then returns itself.
-
index
public SamInputResource index(URL url)
Updates the index to point at the provided resource, then returns itself.
-
index
public SamInputResource index(SeekableStream seekableStream)
Updates the index to point at the provided resource, then returns itself.
-
-