sys::Obj sys::Virtual sys::OutStream
public abstract class OutStream
OutStream is used to output printed text or binary encoded data.
public virtual void close()
Close the stream. Default implementation does nothing.
public virtual void flush()
Flush the stream. Default implementation does nothing.
public OutStream nl()
Print a newline character. Return this.
Print the specified string. Return this.
public OutStream printBool(bool x)
Print a string for the specified boolean. Return this.
public OutStream printChar(int x)
Print the integer as a character. Return this.
public OutStream printDouble(double x)
Print the double as a string.
public OutStream printFloat(float x)
Print the float as a string.
public OutStream printHex(int x)
Print the integer as an unsigned hexadecimal string.
public OutStream printInt(int x)
Print the integer as a signed decimal string. Return this.
public OutStream printLong(long x)
Print the long as a signed decimal string. Return this.
public OutStream printLongHex(long x)
Print the long as an unsigned hexadecimal string.
public OutStream printPad(Str s, int width)
Print the specified string left justified according the specified padding width. Return this.
public abstract bool write(int b)
Write a single byte. Return true on success, false on failure.
public bool writeBool(bool b)
Write a bool 1 or 0. Return true on success or fail on failure.
public abstract bool writeBytes(byte[] b, int off, int len)
Write a block of bytes. Return true on success, false on failure.
public bool writeChar(int b)
Write a character. Return true on success or fail on failure.
public bool writeF4(float v)
Write a four byte (32-bit) floating point value in network byte order. Return true on success, false on failure.
public bool writeF8(double v)
Write an eight byte (64-bit) floating point value in network byte order. Return true on success, false on failure.
public bool writeI2(int v)
Write a two byte integer in network byte order. Return true on success, false on failure.
public bool writeI4(int v)
Write a four byte (32-bit) integer in network byte order. Return true on success, false on failure.
public bool writeI8(long v)
Write a eight byte (64-bit) integer in network byte order. Return true on success, false on failure.
public bool writeStr(Str s)
Write the null terminated string. Return true on success, false on failure.