forked from I2P_Developers/i2p.i2p
* Streaming: Throw IOE if socket is closed (ticket #1077),
never return null from stream getters
This commit is contained in:
@@ -25,13 +25,19 @@ public interface I2PSocket extends Closeable {
|
||||
public Destination getPeerDestination();
|
||||
|
||||
/**
|
||||
* @return an InputStream to read from the socket.
|
||||
* As of 0.9.9 will throw an IOE if socket is closed.
|
||||
* Prior to that would return null instead of throwing IOE.
|
||||
*
|
||||
* @return an InputStream to read from the socket. Non-null since 0.9.9.
|
||||
* @throws IOException on failure
|
||||
*/
|
||||
public InputStream getInputStream() throws IOException;
|
||||
|
||||
/**
|
||||
* @return an OutputStream to write into the socket.
|
||||
* As of 0.9.9 will throw an IOE if socket is closed.
|
||||
* Prior to that would return null instead of throwing IOE.
|
||||
*
|
||||
* @return an OutputStream to write into the socket. Non-null since 0.9.9.
|
||||
* @throws IOException on failure
|
||||
*/
|
||||
public OutputStream getOutputStream() throws IOException;
|
||||
|
Reference in New Issue
Block a user