public class PRWriterCompressor
extends java.io.Writer
PRWriterCompressor
is an enhanced version of PRWriter that
allows for a GZIP stream to be written at the same time as the regular
stream.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT |
static java.lang.String |
VERSION |
Constructor and Description |
---|
PRWriterCompressor(java.io.File aFile,
java.io.File aGZIPFile,
java.lang.String aEncoding)
Deprecated.
|
PRWriterCompressor(java.io.OutputStream aOutStream,
java.io.OutputStream aSecondaryStream,
java.lang.String aEncoding)
Creates a new
PRWriterCompressor from the specified OutputStream s. |
PRWriterCompressor(java.io.OutputStream aOutStream,
java.io.OutputStream aSecondaryStream,
java.lang.String aEncoding,
boolean aIncludeBOM)
Creates a new
PRWriterCompressor from the specified OutputStream s. |
PRWriterCompressor(PRFile aFile,
PRFile aGZIPFile,
java.lang.String aEncoding)
Deprecated.
|
PRWriterCompressor(java.lang.String aFilePathName,
java.lang.String aGZIPFilePathName,
java.lang.String aEncoding)
Create a file, and optionally, a corresponding GZIP output file
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String VERSION
public PRWriterCompressor(java.io.OutputStream aOutStream, java.io.OutputStream aSecondaryStream, java.lang.String aEncoding) throws java.io.UnsupportedEncodingException, java.io.IOException
PRWriterCompressor
from the specified OutputStream
s.aOutStream
- The output streamaEncoding
- The encoding type to use. See PRFileUtil.ENCODING_* typesaSecondaryStream
- The secondary output stream to be writtent to.java.io.UnsupportedEncodingException
java.io.IOException
public PRWriterCompressor(java.io.OutputStream aOutStream, java.io.OutputStream aSecondaryStream, java.lang.String aEncoding, boolean aIncludeBOM) throws java.io.UnsupportedEncodingException, java.io.IOException
PRWriterCompressor
from the specified OutputStream
s.aOutStream
- The output streamaEncoding
- The encoding type to use. See PRFileUtil.ENCODING_* typesaSecondaryStream
- The secondary output stream to be written to.aIncludeBOM
- if the ultimate encoding is UTF-8, then a BOM will be included if aIncludeBOM is true
and the default file encoding is NOT UTF-8.java.io.UnsupportedEncodingException
java.io.IOException
public PRWriterCompressor(java.io.File aFile, java.io.File aGZIPFile, java.lang.String aEncoding) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException, java.io.IOException
PRWriter
from the specified aFile
.aFile
- The fileaGZIPFile
- if you want a gzip version written as well.aEncoding
- The encoding type to use. See PRFileUtil.ENCODING_* typesjava.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
public PRWriterCompressor(PRFile aFile, PRFile aGZIPFile, java.lang.String aEncoding) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException, java.io.IOException
PRWriter
from the specified aFile
.aFile
- The fileaGZIPFile
- PRFile if you want a gzip version written as well.aEncoding
- The encoding type to use. See PRFileUtil.ENCODING_* typesjava.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
public PRWriterCompressor(java.lang.String aFilePathName, java.lang.String aGZIPFilePathName, java.lang.String aEncoding) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException, java.io.IOException
aFilePathName
- aGZIPFilePathName
- aEncoding
- java.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.Writer
java.io.IOException
OutputStreamWriter.close()
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.Writer
java.io.IOException
OutputStreamWriter.flush()
public void write(char[] aCbuf, int aOff, int aLen) throws java.io.IOException
write
in class java.io.Writer
aCbuf
- Buffer of charactersaOff
- Offset from which to start writing charactersaLen
- Number of characters to writejava.io.IOException
- If an I/O error occursOutputStreamWriter.write(char[], int, int)
Copyright © 2015 Pegasystems Inc. All Rights Reserved.