Search results

StreamWriter

StreamWriter class contains the implementation for writing characters to a file in a particular encoding

let writer = new StreamWriter();
writer.write('Hello World');
writer.save('Sample.txt');
writer.dispose();

Properties

buffer Blob

Gets the content written to the StreamWriter as Blob.

encoding Encoding

Gets the encoding.

Methods

destroy

Releases the resources used by the StreamWriter

Returns void

save

Saves the file with specified name and sends the file to client browser

Parameter Type Description
fileName string The file name to save

Returns void

write

Writes the specified string.

Parameter Type Description
value string The string to write. If value is null or undefined, nothing is written.

Returns void

writeLine

Writes the specified string followed by a line terminator

Parameter Type Description
value string The string to write. If value is null or undefined, nothing is written

Returns void