Class WasiSocketInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class WasiSocketInputStream
    extends java.io.FilterInputStream
    Input stream used by WasiSocket and WasiSSL
    • Field Summary

      • Fields inherited from class java.io.FilterInputStream

        in
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isConnectionReset()
      Check whether the connection has been reset by the peer.
      int read()  
      int read​(byte[] b, int off, int len)  
      void setNonBlocking​(boolean nonBlockingMode)  
      • Methods inherited from class java.io.FilterInputStream

        available, close, mark, markSupported, read, reset, skip
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

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

      • WasiSocketInputStream

        public WasiSocketInputStream​(java.net.Socket socket)
                              throws java.io.IOException
        Parameters:
        socket - the underlying socket to be used to read data.
        Throws:
        java.io.IOException
    • Method Detail

      • read

        public int read​(@Nullable
                        byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • read

        public int read()
                 throws java.io.IOException
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException
      • setNonBlocking

        public void setNonBlocking​(boolean nonBlockingMode)
      • isConnectionReset

        public boolean isConnectionReset()
                                  throws java.io.IOException
        Check whether the connection has been reset by the peer.
        Returns:
        connection reset status.
        Throws:
        java.io.IOException - if an I/O error occurs.