Package org.dishevelled.compress
Class Writers
java.lang.Object
org.dishevelled.compress.Writers
File, path, and output stream writers with support for bgzf, gzip, bzip2, xz, or zstd compression.
- Author:
- Michael Heuer
-
Method Summary
Modifier and TypeMethodDescriptionstatic PrintWriter
bgzfOutputStreamWriter
(OutputStream outputStream) Create and return a new buffered print writer with bgzf compression for the specified output stream.static PrintWriter
bzip2OutputStreamWriter
(OutputStream outputStream) Create and return a new buffered print writer with bzip2 compression for the specified output stream.static PrintWriter
gzipOutputStreamWriter
(OutputStream outputStream) Create and return a new buffered print writer with gzip compression for the specified output stream.static PrintWriter
Create and return a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for the specified file orstdout
if the file is null or-
.static PrintWriter
Create and return a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for the specified file orstdout
if the file is null or-
.static PrintWriter
Create and return a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for the specified path name orstdout
if the path name is null or-
.static PrintWriter
Create and return a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for the specified path name orstdout
if the path name is null or-
.static PrintWriter
Create and return a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for the specified path orstdout
if the path is null or-
.static PrintWriter
Create and return a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for the specified path orstdout
if the path is null or-
.static PrintWriter
xzOutputStreamWriter
(OutputStream outputStream) Create and return a new buffered print writer with XZ compression for the specified output stream.static PrintWriter
zstdOutputStreamWriter
(OutputStream outputStream) Create and return a new buffered print writer with Zstandard (zstd) compression for the specified output stream.
-
Method Details
-
bgzfOutputStreamWriter
Create and return a new buffered print writer with bgzf compression for the specified output stream.- Parameters:
outputStream
- output stream, must not be null- Returns:
- a new buffered print writer with bgzf compression for the specified output stream
- Throws:
IOException
- if an I/O error occurs- Since:
- 1.3
-
gzipOutputStreamWriter
Create and return a new buffered print writer with gzip compression for the specified output stream.- Parameters:
outputStream
- output stream, must not be null- Returns:
- a new buffered print writer with gzip compression for the specified output stream
- Throws:
IOException
- if an I/O error occurs
-
bzip2OutputStreamWriter
Create and return a new buffered print writer with bzip2 compression for the specified output stream.- Parameters:
outputStream
- output stream, must not be null- Returns:
- a new buffered print writer with bzip2 compression for the specified output stream
- Throws:
IOException
- if an I/O error occurs
-
xzOutputStreamWriter
Create and return a new buffered print writer with XZ compression for the specified output stream.- Parameters:
outputStream
- output stream, must not be null- Returns:
- a new buffered print writer with XZ compression for the specified output stream
- Throws:
IOException
- if an I/O error occurs- Since:
- 1.5
-
zstdOutputStreamWriter
Create and return a new buffered print writer with Zstandard (zstd) compression for the specified output stream.- Parameters:
outputStream
- output stream, must not be null- Returns:
- a new buffered print writer with Zstandard (zstd) compression for the specified output stream
- Throws:
IOException
- if an I/O error occurs- Since:
- 1.4
-
writer
Create and return a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for the specified path name orstdout
if the path name is null or-
.- Parameters:
pathName
- path name, if any- Returns:
- a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for
the specified path name or
stdout
if the path name is null or-
- Throws:
IOException
- if an I/O error occurs- Since:
- 1.6
-
writer
Create and return a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for the specified path name orstdout
if the path name is null or-
.- Parameters:
pathName
- path name, if anyappend
- true to append to the specified path name- Returns:
- a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for
the specified path name or
stdout
if the path name is null or-
- Throws:
IOException
- if an I/O error occurs- Since:
- 1.6
-
writer
Create and return a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for the specified path orstdout
if the path is null or-
.- Parameters:
path
- path, if any- Returns:
- a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for
the specified path or
stdout
if the path is null or-
- Throws:
IOException
- if an I/O error occurs- Since:
- 1.6
-
writer
Create and return a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for the specified path orstdout
if the path is null or-
.- Parameters:
path
- path, if anyappend
- true to append to the specified path- Returns:
- a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for
the specified path or
stdout
if the path is null or-
- Throws:
IOException
- if an I/O error occurs- Since:
- 1.6
-
writer
Create and return a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for the specified file orstdout
if the file is null or-
.- Parameters:
file
- file, if any- Returns:
- a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for
the specified file or
stdout
if the file is null or-
- Throws:
IOException
- if an I/O error occurs
-
writer
Create and return a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for the specified file orstdout
if the file is null or-
.- Parameters:
file
- file, if anyappend
- true to append to the specified file- Returns:
- a new buffered print writer with support for bgzf, gzip, bzip2, xz, or zstd compression for
the specified file or
stdout
if the file is null or-
- Throws:
IOException
- if an I/O error occurs
-