public class StringFileOutput extends java.lang.Object implements StringOutput
Constructor and Description |
---|
StringFileOutput(java.io.File file,
java.lang.String charset)
Initialize.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush()
Flushes the stream.
|
void |
write(java.lang.String str)
Writes a string.
|
public StringFileOutput(java.io.File file, java.lang.String charset) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundException
file
- source formatcharset
- file charsetjava.io.UnsupportedEncodingException
- UnsupportedEncodingExceptionjava.io.FileNotFoundException
- FileNotFoundExceptionpublic void write(java.lang.String str) throws java.io.IOException
StringOutput
write
in interface StringOutput
str
- stringjava.io.IOException
- If an I/O error occurspublic void flush() throws java.io.IOException
StringOutput
flush
in interface StringOutput
java.io.IOException
- If an I/O error occurspublic void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
java.io.IOException