Package htsjdk.samtools.seekablestream
Class SeekableFTPStream
java.lang.Object
java.io.InputStream
htsjdk.samtools.seekablestream.SeekableStream
htsjdk.samtools.seekablestream.SeekableFTPStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
Unfortunately the seekable stream classes exist for both Tribble and Picard, and we need both. This class
is for use with Tribble and delegates all the work to a helper.
-
Field Summary
Fields inherited from class htsjdk.samtools.seekablestream.SeekableStream
mark
-
Constructor Summary
ConstructorsConstructorDescriptionSeekableFTPStream
(URL url) SeekableFTPStream
(URL url, UserPasswordInput userPasswordInput) -
Method Summary
Methods inherited from class htsjdk.samtools.seekablestream.SeekableStream
available, mark, markSupported, readFully, reset
Methods inherited from class java.io.InputStream
nullInputStream, read, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
SeekableFTPStream
- Throws:
IOException
-
SeekableFTPStream
- Throws:
IOException
-
-
Method Details
-
seek
public void seek(long position) Description copied from class:SeekableStream
Seeks the stream to the provided position.- Specified by:
seek
in classSeekableStream
-
position
public long position()- Specified by:
position
in classSeekableStream
- Returns:
- the current byte position of the stream.
-
eof
- Specified by:
eof
in classSeekableStream
- Returns:
true
if the stream is already consumed;false
otherwise.- Throws:
IOException
-
getSource
- Specified by:
getSource
in classSeekableStream
- Returns:
- String representation of source (e.g. URL, file path, etc.), or null if not available.
-
length
public long length()- Specified by:
length
in classSeekableStream
- Returns:
- the length of the stream; 0 if not available or empty.
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-
read
- Specified by:
read
in classSeekableStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classSeekableStream
- Throws:
IOException
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
main
- Throws:
IOException
-