|
GXPARSE hosted by |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Writer
ca.gorman.io.BinaryFileWriter
public class BinaryFileWriter
Convenience class for writing characters to a File
without translation to a Charset
.
Field Summary |
---|
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
BinaryFileWriter(File file)
Construct on a File . |
Method Summary | |
---|---|
void |
close()
Close the stream, after flushing it. |
void |
flush()
Flush the stream, writing any buffered characters out to the File . |
void |
write(char[] cbuf,
int off,
int len)
Write characters. |
void |
write(int c)
Write a single character. |
Methods inherited from class java.io.Writer |
---|
append, append, append, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BinaryFileWriter(File file) throws IOException
Construct on a File
.
NullPointerException
- if file
is null
IOException
Method Detail |
---|
public void write(int c) throws IOException
Write a single character.
write
in class Writer
c
- an int
that contains the character in the low
16-bits.
IOException
public void write(char[] cbuf, int off, int len) throws IOException
Write characters.
write
in class Writer
cbuf
- characters to writeoff
- offset to first characterlen
- number to write
IndexOutOfBoundsException
- if off
, len
,
or their sum have values that would identify characters
outside the bounds of the array.
NullPointerException
- if cbuf
is null
IOException
public void close() throws IOException
Close the stream, after flushing
it. Any subsequent
invocations of this method will be ignored, but subsequent invocations
of write
and flush
methods will throw an
IOException
.
close
in interface Closeable
close
in class Writer
IOException
public void flush() throws IOException
Flush the stream, writing any buffered characters out to the
File
.
flush
in interface Flushable
flush
in class Writer
IOException
|
GXPARSE download | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |