Package jadex.common
Class ProxyInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
jadex.common.ProxyInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
ProtectedInputStream
The proxy input stream is similar to filter input stream but
overrides read(byte[]) to redirect it to the same input stream method.
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
read
(byte[] data) Invokes the delegate'sread(byte[])
method.Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, reset, skip
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
ProxyInputStream
Constructs a new ProxyInputStream.- Parameters:
proxy
- The input stream to which calls are delegated.
-
-
Method Details
-
read
Invokes the delegate'sread(byte[])
method.- Overrides:
read
in classFilterInputStream
- Parameters:
data
- The buffer to read the bytes into.- Returns:
- The number of bytes read or -1 if the end of stream.
- Throws:
IOException
- if an I/O error occurs.
-