Package jadex.common

Class ProxyInputStream

All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
ProtectedInputStream

public abstract class ProxyInputStream extends 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 Details

    • ProxyInputStream

      public ProxyInputStream(InputStream proxy)
      Constructs a new ProxyInputStream.
      Parameters:
      proxy - The input stream to which calls are delegated.
  • Method Details

    • read

      public int read(byte[] data) throws IOException
      Invokes the delegate's read(byte[]) method.
      Overrides:
      read in class FilterInputStream
      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.