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 SamInputResource
index(SeekableStream seekableStream)
Updates the index to point at the provided resource, then returns itself.SamInputResource
index(File file)
Updates the index to point at the provided resource, then returns itself.SamInputResource
index(InputStream inputStream)
Updates the index to point at the provided resource, then returns itself.SamInputResource
index(URL url)
Updates the index to point at the provided resource, then returns itself.SamInputResource
index(Path path)
Updates the index to point at the provided resource, then returns itself.SamInputResource
index(Path path, Function<SeekableByteChannel,SeekableByteChannel> wrapper)
Updates the index to point at the provided resource, with the provided wrapper, then returns itself.static SamInputResource
of(SeekableStream seekableStream)
Creates aSamInputResource
reading from the provided resource, with no index.static SamInputResource
of(SRAAccession acc)
static SamInputResource
of(File file)
Creates aSamInputResource
reading from the provided resource, with no index.static SamInputResource
of(InputStream inputStream)
Creates aSamInputResource
reading from the provided resource, with no index.static SamInputResource
of(String string)
Creates aSamInputResource
from a string specifying *either* a url or a file pathstatic SamInputResource
of(URL url)
Creates aSamInputResource
reading from the provided resource, with no index.static SamInputResource
of(Path path)
Creates aSamInputResource
reading from the provided resource, with no index.static SamInputResource
of(Path path, Function<SeekableByteChannel,SeekableByteChannel> wrapper)
Creates aSamInputResource
reading from the provided resource, with no index, and with a wrapper to apply to the SeekableByteChannel for custom prefetching/buffering.String
toString()
-
-
-
Method Detail
-
of
public static SamInputResource of(File file)
Creates aSamInputResource
reading from the provided resource, with no index.
-
of
public static SamInputResource of(Path path)
Creates aSamInputResource
reading from the provided resource, with no index.
-
of
public static SamInputResource of(Path path, Function<SeekableByteChannel,SeekableByteChannel> wrapper)
Creates aSamInputResource
reading 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 aSamInputResource
reading from the provided resource, with no index.
-
of
public static SamInputResource of(URL url)
Creates aSamInputResource
reading from the provided resource, with no index.
-
of
public static SamInputResource of(SeekableStream seekableStream)
Creates aSamInputResource
reading from the provided resource, with no index.
-
of
public static SamInputResource of(SRAAccession acc)
-
of
public static SamInputResource of(String string)
Creates aSamInputResource
from 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.
-
-