de.tu_darmstadt.sp.ssl
Class SSLeayInputStream
java.lang.Object
|
+--java.io.InputStream
|
+--de.tu_darmstadt.sp.ssl.SSLeayInputStream
- public class SSLeayInputStream
- extends java.io.InputStream
Class SSLeayInputStream creates an input stream based on a
SSLeayHandle
.
- Version:
- $Revision: 1.3 $
- Author:
- Andrei Popovici
Constructor Summary |
SSLeayInputStream(SSLeayHandle handle)
Create an Input stream which reads bytes from the given
handle representing a valid SSL connection. |
Method Summary |
int |
read()
Reads one byte using the three argument read. |
int |
read(byte[] b,
int off,
int length)
Reads into a byte array from underlying SSL socket. |
Methods inherited from class java.io.InputStream |
available,
close,
mark,
markSupported,
read,
reset,
skip |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SSLeayInputStream
public SSLeayInputStream(SSLeayHandle handle)
- Create an Input stream which reads bytes from the given
handle
representing a valid SSL connection.
The read
methods can be used only
after the SSL handshake protocol on the given connection.
- Parameters:
handle
- the SSL peer
read
public int read()
throws java.io.IOException
- Reads one byte using the three argument read.
- Returns:
- byte read
- Throws:
- java.io.IOException - if an I/O error occurs or underlying
socket is not SSL connected (handshake not performed)
- Overrides:
- read in class java.io.InputStream
read
public int read(byte[] b,
int off,
int length)
throws java.io.IOException
- Reads into a byte array from underlying
SSL
socket.
- Parameters:
b
- byte array to read intooff
- offset into b
length
- number of bytes to read- Returns:
- actual number of bytes read
- Throws:
- java.io.IOException - if an I/O occursor underlying
socket is not SSL connected (handshake not performed)
- Overrides:
- read in class java.io.InputStream