Back to the RMI Plug-in for Eclipse

demo.rmi.filesystem.client
Class RemoteInputStreamWrapper

java.lang.Object
  extended by java.io.InputStream
      extended by demo.rmi.filesystem.client.RemoteInputStreamWrapper
All Implemented Interfaces:
Closeable

public class RemoteInputStreamWrapper
extends InputStream

A wrapper for a remote input stream. It extends InputStream so it can be used in APIs that expect InputStream and can't work with our IRemoteInputStream. Notice the implementation of read(byte[], int, int) that must use IRemoteInputStream.read(int).

Author:
Genady Beryozkin, rmi-info@genady.net

Field Summary
(package private)  IRemoteInputStream is
           
 
Constructor Summary
RemoteInputStreamWrapper(IRemoteInputStream is)
           
 
Method Summary
 int available()
           
 void close()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 long skip(long n)
           
 
Methods inherited from class java.io.InputStream
mark, markSupported, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

is

IRemoteInputStream is
Constructor Detail

RemoteInputStreamWrapper

public RemoteInputStreamWrapper(IRemoteInputStream is)
Method Detail

available

public int available()
              throws IOException
Overrides:
available in class InputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException

read

public int read(byte[] b)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException

skip

public long skip(long n)
          throws IOException
Overrides:
skip in class InputStream
Throws:
IOException

Back to the RMI Plug-in for Eclipse


© 2002-18 Genady Beryozkin, rmi-info@genady.net. Read our Privacy policy. Hosted on RimuHosting. Visit Javalobby.