Class Writer
dw.io
Class Writer
Object
dw.io.Writer
The class supports writing characters to a stream.

Note: when this class is used with sensitive data, be careful in persisting sensitive information to disk.

All Known Subclasses
Constructor Summary
Writer(stream : OutputStream)
Create a writer from a stream using UTF-8 character encoding.
Writer(stream : OutputStream, encoding : String)
Create a writer from a stream using the specified character encoding.
Method Summary
close() : void
Closes the writer.
flush() : void
Flushes the buffer.
write(str : String) : void
Write the given string to the stream.
write(str : String, off : Number, len : Number) : void
Write the given string to the stream.
Constructor Detail
Writer
public Writer(stream : OutputStream)
Create a writer from a stream using UTF-8 character encoding.
Parameters:
stream - the output stream to use when creating the writer.

Writer
public Writer(stream : OutputStream, encoding : String)
Create a writer from a stream using the specified character encoding.
Parameters:
stream - the output stream to use when creating the writer.
encoding - the encoding to use when creating the writer.

Method Detail
close
close() : void
Closes the writer.

flush
flush() : void
Flushes the buffer.

write
write(str : String) : void
Write the given string to the stream.
Parameters:
str - the string to write to the stream.

write
write(str : String, off : Number, len : Number) : void
Write the given string to the stream.
Parameters:
str - the string to write to the stream.
off - the offset from which to start writing characters to the stream.
len - the number of characters to write from the stream.