libperun

Class std.io.OutputStream

Synopsis

public abstract class OutputStream

An output stream is an object which allows one send data to some destination. This class also performs formatting of the data.

Fields

Constructors

Methods

protected abstract void writeBytes(byte_t[] bytes);

This method must be implemented in child classes to implement the actual output mechanism. The bytes stored in the byte array given are written to the stream.

Arguments
bytesThe bytes to be written to the stream.
Throws
std.io.IOErrorIf an error occured trying to write the data.
public final void write(String str);

Write the specified string to the stream.

Arguments
strThe string to be written.
Throws
std.io.IOErrorIf an error occured trying to write the data.
public final void write(byte_t[] bytes);

Write the specified bytes to the stream.

Arguments
bytesThe bytes to write.
public final void writeLine(String line);

Write a line of text to the stream.

Arguments
lineThe line to be written.
Throws
std.io.IOErrorIf an error occured trying to write the data.