extern class java.io.Writerimplements Appendableimplements Closeableimplements FlushableAvailable in javaAbstract class for writing to character streams. The only methods that a subclass must implement are write(char, int, int), flush(), and close(). Most subclasses, however, will override some of the methods defined here in order to provide higher efficiency, additional functionality, or both.
see Writer see BufferedWriter see   CharArrayWriter see FilterWriter see   OutputStreamWriter see FileWriter see   PipedWriter see PrintWriter see   StringWriter see Reader
author      Mark Reinhold since JDK1.1
function append( param1 : Char16 ) : AppendableAppends the specified character sequence to this writer.
<p> An invocation of this method of the form <tt>out.append(csq)</tt> behaves in exactly the same way as the invocation
<pre> out.write(csq.toString()) </pre>
<p> Depending on the specification of <tt>toString</tt> for the character sequence <tt>csq</tt>, the entire sequence may not be appended. For instance, invoking the <tt>toString</tt> method of a character buffer will return a subsequence whose content depends upon the buffer's position and limit.
@param csq The character sequence to append. If <tt>csq</tt> is <tt>null</tt>, then the four characters <tt>"null"</tt> are appended to this writer.
@return This writer
@throws IOException If an I/O error occurs
@since 1.5
function close() : VoidCloses the stream, flushing it first. Once the stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously closed stream has no effect.
@throws IOException If an I/O error occurs
function flush() : VoidFlushes the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams.
<p> If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.
@throws IOException If an I/O error occurs
function write( param1 : Int ) : VoidWrites a single character. The character to be written is contained in the 16 low-order bits of the given integer value; the 16 high-order bits are ignored.
<p> Subclasses that intend to support efficient single-character output should override this method.
@param c int specifying a character to be written
@throws IOException If an I/O error occurs
version #18560, modified 2013-05-08 10:54:26 by api
0 comment