Package org.conscrypt
Class SSLSocketInputStream
java.lang.Object
java.io.InputStream
org.conscrypt.SSLSocketInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
public final class SSLSocketInputStream extends InputStream
This class provides input data stream functionality
for SSLSocket. It accumulates the application data
received by SSL protocol.
-
Field Summary
Fields Modifier and Type Field Description protected org.conscrypt.SSLSocketInputStream.AdapterdataPoint -
Constructor Summary
Constructors Modifier Constructor Description protectedSSLSocketInputStream(SSLSocketImpl owner)Creates the application data input stream for specified socket. -
Method Summary
Modifier and Type Method Description intavailable()Returns the number of bytes available for reading without blocking.voidclose()Closes the streamintread()Reads one byte.intread(byte[] b, int off, int len)Reads up tobyteCountbytes from this stream and stores them in the byte arraybufferstarting atbyteOffset.protected voidsetEnd()Tells to the stream that the end of the income data has been reached.Methods inherited from class java.io.InputStream
mark, markSupported, read, reset, skip
-
Field Details
-
dataPoint
protected org.conscrypt.SSLSocketInputStream.Adapter dataPoint
-
-
Constructor Details
-
SSLSocketInputStream
Creates the application data input stream for specified socket.- Parameters:
owner- the socket which will provide this input stream to client applications.
-
-
Method Details
-
setEnd
protected void setEnd()Tells to the stream that the end of the income data has been reached. -
available
Returns the number of bytes available for reading without blocking.- Overrides:
availablein classInputStream- Returns:
- the number of available bytes.
- Throws:
IOException
-
close
Closes the stream- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
read
Reads one byte. If there is no data in the underlying buffer, this operation can block until the data will be available.- Specified by:
readin classInputStream- Returns:
- read value.
- Throws:
IOException
-
read
Description copied from class:InputStreamReads up tobyteCountbytes from this stream and stores them in the byte arraybufferstarting atbyteOffset. Returns the number of bytes actually read or -1 if the end of the stream has been reached.- Overrides:
readin classInputStream- Throws:
IOException- if the stream is closed or another IOException occurs.
-