Sedona

sys::OutStream


sys::Obj
  sys::Virtual
    sys::OutStream

public abstract class OutStream

OutStream is used to output printed text or binary encoded data.


close

public virtual void close()

Close the stream. Default implementation does nothing.

flush

public virtual void flush()

Flush the stream. Default implementation does nothing.

nl

public OutStream nl()

Print a newline character. Return this.

print

public OutStream print(Str s)

Print the specified string. Return this.

printBool

public OutStream printBool(bool x)

Print a string for the specified boolean. Return this.

printChar

public OutStream printChar(int x)

Print the integer as a character. Return this.

printDouble

public OutStream printDouble(double x)

Print the double as a string.

printFloat

public OutStream printFloat(float x)

Print the float as a string.

printHex

public OutStream printHex(int x)

Print the integer as an unsigned hexadecimal string.

printInt

public OutStream printInt(int x)

Print the integer as a signed decimal string. Return this.

printLong

public OutStream printLong(long x)

Print the long as a signed decimal string. Return this.

printLongHex

public OutStream printLongHex(long x)

Print the long as an unsigned hexadecimal string.

printPad

public OutStream printPad(Str s, int width)

Print the specified string left justified according the specified padding width. Return this.

write

public abstract bool write(int b)

Write a single byte. Return true on success, false on failure.

writeBool

public bool writeBool(bool b)

Write a bool 1 or 0. Return true on success or fail on failure.

writeBytes

public abstract bool writeBytes(byte[] b, int off, int len)

Write a block of bytes. Return true on success, false on failure.

writeChar

public bool writeChar(int b)

Write a character. Return true on success or fail on failure.

writeF4

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.

writeF8

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.

writeI2

public bool writeI2(int v)

Write a two byte integer in network byte order. Return true on success, false on failure.

writeI4

public bool writeI4(int v)

Write a four byte (32-bit) integer in network byte order. Return true on success, false on failure.

writeI8

public bool writeI8(long v)

Write a eight byte (64-bit) integer in network byte order. Return true on success, false on failure.

writeStr

public bool writeStr(Str s)

Write the null terminated string. Return true on success, false on failure.