public class UnicodeFileWriter extends UnicodeOutputStreamWriter
UnicodeOutputStreamWriter which directs its output to a
file. All constructors pass-thru to a UnicodeOutputStreamWriter constructor an OutputStream that
is built using a FileOutputStream constructor.
Appending to an existing file is safe: if the file exists, and is non-empty, then no signature BOM is recorded (regardless of the specified or deduced signature/charset) because we assume that a BOM is already present. However, this class does not attempt to check that, in this case, the existing signature BOM and associated charset match the one supplied in the constructor.
append, append, append, close, flush, getRequestedSignatureCharset, getSignatureCharset, write, write, write, write, writepublic UnicodeFileWriter(String fileName) throws FileNotFoundException
UnicodeOutputStreamWriter.UnicodeOutputStreamWriter(OutputStream)
and FileOutputStream.FileOutputStream(String)
constructors.fileName - The file name.FileNotFoundException - Propagated from the FileOutputStream constructor.public UnicodeFileWriter(String fileName, SignatureCharset requestedSignatureCharset) throws FileNotFoundException
UnicodeOutputStreamWriter.UnicodeOutputStreamWriter(OutputStream,
SignatureCharset) and FileOutputStream.FileOutputStream(String) constructors.fileName - The file name.requestedSignatureCharset - The signature/charset. It may
be null to use the default JVM charset.FileNotFoundException - Propagated from the FileOutputStream constructor.public UnicodeFileWriter(String fileName, Reader reader) throws IOException
UnicodeOutputStreamWriter.UnicodeOutputStreamWriter(OutputStream,
Reader) and FileOutputStream.FileOutputStream(String)
constructors.fileName - The file name.reader - The reader.IOException - Thrown if an I/O error occurs,
incl. propagation from the FileOutputStream
constructor.public UnicodeFileWriter(String fileName, boolean append) throws FileNotFoundException
UnicodeOutputStreamWriter.UnicodeOutputStreamWriter(OutputStream)
and FileOutputStream.FileOutputStream(String,boolean)
constructors.fileName - The file name.append - True if data should be appended to the file.FileNotFoundException - Propagated from the FileOutputStream constructor.public UnicodeFileWriter(String fileName, boolean append, SignatureCharset requestedSignatureCharset) throws FileNotFoundException
UnicodeOutputStreamWriter.UnicodeOutputStreamWriter(OutputStream,
SignatureCharset) and FileOutputStream.FileOutputStream(String,boolean)
constructors.fileName - The file name.append - True if data should be appended to the file.requestedSignatureCharset - The signature/charset. It may
be null to use the default JVM charset.FileNotFoundException - Propagated from the FileOutputStream constructor.public UnicodeFileWriter(String fileName, boolean append, Reader reader) throws IOException
UnicodeOutputStreamWriter.UnicodeOutputStreamWriter(OutputStream,
Reader) and FileOutputStream.FileOutputStream(String,boolean)
constructors.fileName - The file name.append - True if data should be appended to the file.reader - The reader.IOException - Thrown if an I/O error occurs,
incl. propagation from the FileOutputStream
constructor.public UnicodeFileWriter(File file) throws FileNotFoundException
UnicodeOutputStreamWriter.UnicodeOutputStreamWriter(OutputStream)
and FileOutputStream.FileOutputStream(File)
constructors.file - The file.FileNotFoundException - Propagated from the FileOutputStream constructor.public UnicodeFileWriter(File file, SignatureCharset requestedSignatureCharset) throws FileNotFoundException
UnicodeOutputStreamWriter.UnicodeOutputStreamWriter(OutputStream,
SignatureCharset) and FileOutputStream.FileOutputStream(File) constructors.file - The file.requestedSignatureCharset - The signature/charset. It may
be null to use the default JVM charset.FileNotFoundException - Propagated from the FileOutputStream constructor.public UnicodeFileWriter(File file, Reader reader) throws IOException
UnicodeOutputStreamWriter.UnicodeOutputStreamWriter(OutputStream,
Reader) and FileOutputStream.FileOutputStream(File)
constructors.file - The file.reader - The reader.IOException - Thrown if an I/O error occurs,
incl. propagation from the FileOutputStream constructor.public UnicodeFileWriter(File file, boolean append) throws FileNotFoundException
UnicodeOutputStreamWriter.UnicodeOutputStreamWriter(OutputStream)
and FileOutputStream.FileOutputStream(File,boolean)
constructors.file - The file.append - True if data should be appended to the file.FileNotFoundException - Propagated from the FileOutputStream constructor.public UnicodeFileWriter(File file, boolean append, SignatureCharset requestedSignatureCharset) throws FileNotFoundException
UnicodeOutputStreamWriter.UnicodeOutputStreamWriter(OutputStream,
SignatureCharset) and FileOutputStream.FileOutputStream(File,boolean) constructors.file - The file.append - True if data should be appended to the file.requestedSignatureCharset - The signature/charset. It may
be null to use the default JVM charset.FileNotFoundException - Propagated from the FileOutputStream constructor.public UnicodeFileWriter(File file, boolean append, Reader reader) throws IOException
UnicodeOutputStreamWriter.UnicodeOutputStreamWriter(OutputStream,
Reader) and FileOutputStream.FileOutputStream(File,boolean) constructors.file - The file.append - True if data should be appended to the file.reader - The reader.IOException - Thrown if an I/O error occurs,
incl. propagation from the FileOutputStream constructor.public UnicodeFileWriter(FileDescriptor fd)
UnicodeOutputStreamWriter.UnicodeOutputStreamWriter(OutputStream)
and FileOutputStream.FileOutputStream(FileDescriptor)
constructors.fd - The file descriptor.public UnicodeFileWriter(FileDescriptor fd, SignatureCharset requestedSignatureCharset)
UnicodeOutputStreamWriter.UnicodeOutputStreamWriter(OutputStream,
SignatureCharset) and FileOutputStream.FileOutputStream(FileDescriptor) constructors.fd - The file descriptor.requestedSignatureCharset - The signature/charset. It may
be null to use the default JVM charset.public UnicodeFileWriter(FileDescriptor fd, Reader reader) throws IOException
UnicodeOutputStreamWriter.UnicodeOutputStreamWriter(OutputStream,
Reader) and FileOutputStream.FileOutputStream(FileDescriptor)
constructors.fd - The file descriptor.reader - The reader.IOException - Thrown if an I/O error occurs.Copyright © 2015. All Rights Reserved.