Package com.microej.kf.util.control.net
Class SocketInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- com.microej.kf.util.control.net.SocketInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class SocketInputStream extends java.io.FilterInputStreamSocket input stream wrapper used to control net/ssl read call.
-
-
Constructor Summary
Constructors Constructor Description SocketInputStream(java.net.Socket socket, java.io.InputStream inputstream)Creates a socket input stream instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intread()intread(byte[] b, int off, int len)-
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, read, reset, skip
-
-
-
-
Constructor Detail
-
SocketInputStream
public SocketInputStream(java.net.Socket socket, java.io.InputStream inputstream) throws java.io.IOExceptionCreates a socket input stream instance.- Parameters:
socket- the socket.inputstream- the underlying input stream.- Throws:
java.io.IOException- if an error occurs.
-
-
Method Detail
-
read
public int read() throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.FilterInputStream- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.FilterInputStream- Throws:
java.io.IOException
-
-