public final class Readers extends Object
Modifier and Type | Method and Description |
---|---|
static BufferedReader |
bgzfFileReader(File file)
Create and return a new buffered reader for the specified block compressed gzip (BGZF) compressed file.
|
static BufferedReader |
bgzfInputStreamReader(InputStream inputStream)
Create and return a new buffered reader for the specified block compressed gzip (BGZF) compressed input stream.
|
static BufferedReader |
bzip2FileReader(File file)
Create and return a new buffered reader for the specified bzip2 compressed file.
|
static BufferedReader |
bzip2InputStreamReader(InputStream inputStream)
Create and return a new buffered reader for the specified bzip2 compressed input stream.
|
static BufferedReader |
compressedFileReader(File file)
Create and return a new buffered reader for the specified compressed file,
autodetecting the compression type from the first few bytes of the file.
|
static BufferedReader |
compressedInputStreamReader(InputStream inputStream)
Create and return a new buffered reader for the specified compressed input stream,
autodetecting the compression type from the first few bytes of the stream.
|
static BufferedReader |
gzipFileReader(File file)
Create and return a new buffered reader for the specified gzip compressed file.
|
static BufferedReader |
gzipInputStreamReader(InputStream inputStream)
Create and return a new buffered reader for the specified gzip compressed input stream.
|
static BufferedReader |
inputStreamReader(InputStream inputStream)
Create and return a new buffered reader for the specified input stream.
|
static BufferedReader |
reader(File file)
Create and return a new buffered reader with support for bgzf, gzip, or bzip2 compression for the specified file
or
stdin if the file is null. |
public static BufferedReader inputStreamReader(InputStream inputStream) throws IOException
inputStream
- input stream, must not be nullIOException
- if an I/O error occurspublic static BufferedReader compressedFileReader(File file) throws IOException
file
- file, must not be nullIOException
- if an I/O error occurspublic static BufferedReader compressedInputStreamReader(InputStream inputStream) throws IOException
inputStream
- input stream, must not be nullIOException
- if an I/O error occurspublic static BufferedReader bgzfFileReader(File file) throws IOException
file
- bgzf compressed file, must not be nullIOException
- if an I/O error occurspublic static BufferedReader bgzfInputStreamReader(InputStream inputStream) throws IOException
inputStream
- bgzf compressed input stream, must not be nullIOException
- if an I/O error occurspublic static BufferedReader gzipFileReader(File file) throws IOException
file
- gzip compressed file, must not be nullIOException
- if an I/O error occurspublic static BufferedReader gzipInputStreamReader(InputStream inputStream) throws IOException
inputStream
- gzip compressed input stream, must not be nullIOException
- if an I/O error occurspublic static BufferedReader bzip2FileReader(File file) throws IOException
file
- bzip2 compressed file, must not be nullIOException
- if an I/O error occurspublic static BufferedReader bzip2InputStreamReader(InputStream inputStream) throws IOException
inputStream
- bzip2 compressed input stream, must not be nullIOException
- if an I/O error occurspublic static BufferedReader reader(@Nullable File file) throws IOException
stdin
if the file is null.file
- file, if anystdin
if the file is nullIOException
- if an I/O error occursCopyright (c) 2014-2017 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).