FileAppend
@Deprecated
public class FileWriter
extends java.io.Writer
Modifier and Type | Field and Description |
---|---|
static int |
kFileNotFound
Deprecated.
|
static int |
kFileOpenError
Deprecated.
|
java.lang.String |
sError
Deprecated.
|
static java.lang.String |
sVersion
Deprecated.
Version, history and license.
|
protected java.io.OutputStreamWriter |
writer
Deprecated.
The OutputStreamWriter can't be used as superclass, because the file is able to open
only with calling constructor.
|
Constructor and Description |
---|
FileWriter()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
|
void |
finalize()
Deprecated.
|
void |
flush()
Deprecated.
|
boolean |
isOpen()
Deprecated.
|
int |
open(java.lang.String fileName,
boolean append)
Deprecated.
opens a file to write.
|
int |
open(java.lang.String fileName,
java.lang.String sEncoding,
boolean append)
Deprecated.
opens a file to write.
|
void |
write(char[] cbuf,
int off,
int len)
Deprecated.
|
void |
write(java.lang.String text)
Deprecated.
|
public static final java.lang.String sVersion
open(String, String, boolean)
with specific encoding.
protected java.io.OutputStreamWriter writer
public static final int kFileNotFound
public static final int kFileOpenError
public java.lang.String sError
public int open(java.lang.String fileName, boolean append)
fileName
- Path to the file. To separate folder, a slash '/' should be used.
But a backslash is also accepted.
An absolute path should be start either with slash
or with a one-char drive specifier, following by ':/'.append
- If the file exists, the content written than is appended.public int open(java.lang.String fileName, java.lang.String sEncoding, boolean append)
fileName
- Path to the file. To separate folder, a slash '/' should be used.
But a backslash is also accepted.
Can contain environment variables, can start with /tmp/ or ~ for home, see FileFunctions.absolutePath(String, java.io.File)
.
An absolute path should be start either with slash
or with a one-char drive specifier, following by ':/'.sEncoding
- character encoding for the binary file, "UTF-8" etc.
see OutputStreamWriter.OutputStreamWriter(java.io.OutputStream, String)
append
- If the file exists, the content written than is appended.public boolean isOpen()
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.Writer
public void write(java.lang.String text) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.Writer
java.io.IOException
public void finalize()
finalize
in class java.lang.Object
public void write(char[] cbuf, int off, int len) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException