public class SamInputResource
extends java.lang.Object
File, InputStream, URL, or
SeekableStream; look for the appropriate overload for
htsjdk.samtools.SamInputResource#of().| Modifier and Type | Method and Description |
|---|---|
SamInputResource |
index(java.io.File file)
Updates the index to point at the provided resource, then returns itself.
|
SamInputResource |
index(java.io.InputStream inputStream)
Updates the index to point at the provided resource, then returns itself.
|
SamInputResource |
index(java.nio.file.Path path)
Updates the index to point at the provided resource, then returns itself.
|
SamInputResource |
index(java.nio.file.Path path,
java.util.function.Function<java.nio.channels.SeekableByteChannel,java.nio.channels.SeekableByteChannel> wrapper)
Updates the index to point at the provided resource, with the provided wrapper, then returns itself.
|
SamInputResource |
index(SeekableStream seekableStream)
Updates the index to point at the provided resource, then returns itself.
|
SamInputResource |
index(java.net.URL url)
Updates the index to point at the provided resource, then returns itself.
|
static SamInputResource |
of(java.io.File file)
Creates a
SamInputResource reading from the provided resource, with no index. |
static SamInputResource |
of(java.io.InputStream inputStream)
Creates a
SamInputResource reading from the provided resource, with no index. |
static SamInputResource |
of(java.nio.file.Path path)
Creates a
SamInputResource reading from the provided resource, with no index. |
static SamInputResource |
of(java.nio.file.Path path,
java.util.function.Function<java.nio.channels.SeekableByteChannel,java.nio.channels.SeekableByteChannel> wrapper)
Creates a
SamInputResource reading from the provided resource, with no index,
and with a wrapper to apply to the SeekableByteChannel for custom prefetching/buffering. |
static SamInputResource |
of(SeekableStream seekableStream)
Creates a
SamInputResource reading from the provided resource, with no index. |
static SamInputResource |
of(SRAAccession acc) |
static SamInputResource |
of(java.lang.String string)
Creates a
SamInputResource from a string specifying *either* a url or a file path |
static SamInputResource |
of(java.net.URI uri)
Creates a
SamInputResource from a URI which may represent an htsget path,
or some other resource such as a filesystem path or a URL, with no index. |
static SamInputResource |
of(java.net.URI uri,
java.util.function.Function<java.nio.channels.SeekableByteChannel,java.nio.channels.SeekableByteChannel> wrapper)
Creates a
SamInputResource with no index from a URI which may represent an htsget path,
or some other resource such as a filesystem path or a URL,
with no index, and with a wrapper to apply to the SeekableByteChannel for custom prefetching/buffering. |
static SamInputResource |
of(java.net.URL url)
Creates a
SamInputResource reading from the provided resource, with no index. |
java.lang.String |
toString() |
public java.lang.String toString()
toString in class java.lang.Objectpublic static SamInputResource of(java.io.File file)
SamInputResource reading from the provided resource, with no index.public static SamInputResource of(java.nio.file.Path path)
SamInputResource reading from the provided resource, with no index.public static SamInputResource of(java.nio.file.Path path, java.util.function.Function<java.nio.channels.SeekableByteChannel,java.nio.channels.SeekableByteChannel> wrapper)
SamInputResource reading from the provided resource, with no index,
and with a wrapper to apply to the SeekableByteChannel for custom prefetching/buffering.public static SamInputResource of(java.io.InputStream inputStream)
SamInputResource reading from the provided resource, with no index.public static SamInputResource of(java.net.URL url)
SamInputResource reading from the provided resource, with no index.public static SamInputResource of(SeekableStream seekableStream)
SamInputResource reading from the provided resource, with no index.public static SamInputResource of(SRAAccession acc)
public static SamInputResource of(java.net.URI uri)
SamInputResource from a URI which may represent an htsget path,
or some other resource such as a filesystem path or a URL, with no index.
This method will first attempt to treat the resource as an htsget resource, then fall back to
treating it as a file system path, then as a URLpublic static SamInputResource of(java.net.URI uri, java.util.function.Function<java.nio.channels.SeekableByteChannel,java.nio.channels.SeekableByteChannel> wrapper)
SamInputResource with no index from a URI which may represent an htsget path,
or some other resource such as a filesystem path or a URL,
with no index, and with a wrapper to apply to the SeekableByteChannel for custom prefetching/buffering.
This method will first attempt to treat the resource as an htsget resource, then fall back to
treating it as a file system path, then as a URLpublic static SamInputResource of(java.lang.String string)
SamInputResource from a string specifying *either* a url or a file pathpublic SamInputResource index(java.io.File file)
public SamInputResource index(java.nio.file.Path path)
public SamInputResource index(java.nio.file.Path path, java.util.function.Function<java.nio.channels.SeekableByteChannel,java.nio.channels.SeekableByteChannel> wrapper)
public SamInputResource index(java.io.InputStream inputStream)
public SamInputResource index(java.net.URL url)
public SamInputResource index(SeekableStream seekableStream)