@Immutable public class AS2InputStreamProviderSocket extends Object implements IAS2InputStreamProvider
| Constructor and Description |
|---|
AS2InputStreamProviderSocket(Socket aSocket)
Constructor
|
AS2InputStreamProviderSocket(Socket aSocket,
boolean bNonUpwardClosing)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getInputStream()
According to instance initialization, will either return the regular
InputStream, or a NonClosingInputStream that when closed,
will not close in source stream. |
InputStream |
getNonUpwardClosingInputStream()
Returns an
InputStream, that when closed, will not close in source
stream. |
public AS2InputStreamProviderSocket(@Nonnull Socket aSocket)
aSocket - Socket to read from. May not be null.public AS2InputStreamProviderSocket(@Nonnull Socket aSocket, boolean bNonUpwardClosing)
aSocket - Socket to read from. May not be null.bNonUpwardClosing - When true, closing the InputStream will not close the
Socket@Nonnull public InputStream getInputStream() throws IOException
InputStream, or a NonClosingInputStream that when closed,
will not close in source stream. This is useful when working with
java.net.SocketInputStream as close() on a socket stream
closes the SocketgetInputStream in interface IAS2InputStreamProviderInputStreamIOException - in case of error@Nonnull public InputStream getNonUpwardClosingInputStream() throws IOException
IAS2InputStreamProviderInputStream, that when closed, will not close in source
stream. This is useful when working with
java.net.SocketInputStream, as close() on a socket stream
closes the SocketgetNonUpwardClosingInputStream in interface IAS2InputStreamProvidernullIOException - In case of errorCopyright © 2013–2019 Philip Helger. All rights reserved.