com.healthmarketscience.rmiio
Class SerializableInputStream
java.lang.Object
java.io.InputStream
com.healthmarketscience.rmiio.SerializableInputStream
- All Implemented Interfaces:
- RemoteClient, Closeable, Serializable
public class SerializableInputStream
- extends InputStream
- implements Serializable, RemoteClient
An additional layer around a RemoteInputStream which makes it Serializable
and an InputStream. In general, this extra layer is not necessary and
I do not recommend using this class. However, in the odd case
where the callee really wants to get something which is already an
InputStream, this class can be useful. This is basically just a wrapper
around a call to RemoteInputStreamClient.wrap(com.healthmarketscience.rmiio.RemoteInputStream)
.
- Author:
- James Ahlborn
- See Also:
- Usage Notes,
Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SerializableInputStream
public SerializableInputStream(InputStream localIn)
throws IOException
- Throws:
IOException
SerializableInputStream
public SerializableInputStream(RemoteInputStream remoteIn)
setRemoteRetry
public void setRemoteRetry(RemoteRetry retry)
- Description copied from interface:
RemoteClient
- Sets the client side RemoteRetry policy to use for the underlying remote
communication layer. For most client side implementations, this method
must be called before any other calls on this client object (any calls to
this method after one of those methods is called will have no affect).
- Specified by:
setRemoteRetry
in interface RemoteClient
- Parameters:
retry
- the new RemoteRetry policy to use for remote
communication. null
causes the
RemoteClient.DEFAULT_RETRY
policy to be used.
available
public int available()
throws IOException
- Overrides:
available
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[] buf,
int pos,
int len)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
skip
public long skip(long len)
throws IOException
- Overrides:
skip
in class InputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class InputStream
- Throws:
IOException
Copyright © 2006–2016 Health Market Science. All rights reserved.