Package ej.wasi

Class Wasi.StdOut

  • All Implemented Interfaces:
    WasiIO, WritableIO, java.io.Closeable, java.lang.AutoCloseable
    Enclosing class:
    Wasi

    public static class Wasi.StdOut
    extends java.lang.Object
    implements WritableIO
    • Constructor Summary

      Constructors 
      Constructor Description
      StdOut​(boolean err)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      FileType getType()
      Gets the WasiIO file descriptor type.
      void write​(byte[] buffer, int offset, int length)
      Writes length bytes from t he specified byte array starting at offset offset to this WasiIO.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StdOut

        public StdOut​(boolean err)
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • write

        public void write​(byte[] buffer,
                          int offset,
                          int length)
                   throws java.io.IOException
        Description copied from interface: WritableIO
        Writes length bytes from t he specified byte array starting at offset offset to this WasiIO.
        Specified by:
        write in interface WritableIO
        Parameters:
        buffer - the data to write.
        offset - the starting offset.
        length - the number of bytes to write.
        Throws:
        java.io.IOException - if an I/O error occurs.
      • getType

        public FileType getType()
        Description copied from interface: WasiIO
        Gets the WasiIO file descriptor type.
        Specified by:
        getType in interface WasiIO
        Returns:
        the WasiIO file descriptor type.