Package ej.wasi.io.socket
Class WasiSocketInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- ej.wasi.io.socket.WasiSocketInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class WasiSocketInputStream extends java.io.FilterInputStreamInput stream used byWasiSocketandWasiSSL
-
-
Constructor Summary
Constructors Constructor Description WasiSocketInputStream(java.net.Socket socket)Creates a newWasiSocketInputStream(Socket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisConnectionReset()Check whether the connection has been reset by the peer.intread()intread(byte[] b, int off, int len)voidsetNonBlocking(boolean nonBlockingMode)-
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
-
-
-
-
Constructor Detail
-
WasiSocketInputStream
public WasiSocketInputStream(java.net.Socket socket) throws java.io.IOExceptionCreates a newWasiSocketInputStream(Socket)- 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:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
setNonBlocking
public void setNonBlocking(boolean nonBlockingMode)
-
isConnectionReset
public boolean isConnectionReset() throws java.io.IOExceptionCheck whether the connection has been reset by the peer.- Returns:
- connection reset status.
- Throws:
java.io.IOException- if an I/O error occurs.
-
-