Package jadex.commons
Class ProxyInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- jadex.commons.ProxyInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
ProtectedInputStream
public abstract class ProxyInputStream extends java.io.FilterInputStream
The proxy input stream is similar to filter input stream but overrides read(byte[]) to redirect it to the same input stream method.
-
-
Constructor Summary
Constructors Constructor Description ProxyInputStream(java.io.InputStream proxy)
Constructs a new ProxyInputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
read(byte[] data)
Invokes the delegate'sread(byte[])
method.-
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, reset, skip
-
-
-
-
Method Detail
-
read
public int read(byte[] data) throws java.io.IOException
Invokes the delegate'sread(byte[])
method.- Overrides:
read
in classjava.io.FilterInputStream
- Parameters:
data
- The buffer to read the bytes into.- Returns:
- The number of bytes read or -1 if the end of stream.
- Throws:
java.io.IOException
- if an I/O error occurs.
-
-