demo.rmi.filesystem.client
Class RemoteInputStreamWrapper
java.lang.Object
java.io.InputStream
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
is
IRemoteInputStream is
RemoteInputStreamWrapper
public RemoteInputStreamWrapper(IRemoteInputStream is)
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
© 2002-18 Genady Beryozkin, rmi-info@genady.net.
Read our Privacy policy. Hosted on RimuHosting. Visit Javalobby.