jist.runtime
Class RemoteIO.RemoteInputStreamSender

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by jist.runtime.RemoteIO.RemoteInputStreamSender
All Implemented Interfaces:
java.io.Serializable, java.rmi.Remote, RemoteIO.RemoteInputStreamRemote
Enclosing class:
RemoteIO

public static class RemoteIO.RemoteInputStreamSender
extends java.rmi.server.UnicastRemoteObject
implements RemoteIO.RemoteInputStreamRemote

Remote-side of remote input stream.

See Also:
Serialized Form

Field Summary
private  java.io.InputStream lin
          Underlying input stream, source of all data.
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
RemoteIO.RemoteInputStreamSender(java.io.InputStream lin)
          Create a new remote input stream server.
 
Method Summary
 void close()
          Close the underlying remote input stream.
 void finalize()
          
 int read()
          Read a byte.
 byte[] read(int len)
          Read a sequence of bytes.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

lin

private java.io.InputStream lin
Underlying input stream, source of all data.

Constructor Detail

RemoteIO.RemoteInputStreamSender

public RemoteIO.RemoteInputStreamSender(java.io.InputStream lin)
                                 throws java.rmi.RemoteException
Create a new remote input stream server.

Parameters:
lin - underlying source input stream
Throws:
java.rmi.RemoteException - rpc failure
Method Detail

finalize

public void finalize()

Overrides:
finalize in class java.lang.Object

read

public int read()
         throws java.io.IOException,
                java.rmi.RemoteException
Read a byte.

Specified by:
read in interface RemoteIO.RemoteInputStreamRemote
Returns:
byte read; -1 for EOF
Throws:
java.io.IOException - underlying input/output error
java.rmi.RemoteException - rpc failure

read

public byte[] read(int len)
            throws java.io.IOException,
                   java.rmi.RemoteException
Read a sequence of bytes.

Specified by:
read in interface RemoteIO.RemoteInputStreamRemote
Parameters:
len - number of bytes to read
Returns:
array of bytes read, less than or equal to len
Throws:
java.io.IOException - underlying input/output error
java.rmi.RemoteException - rpc failure

close

public void close()
           throws java.io.IOException,
                  java.rmi.RemoteException
Close the underlying remote input stream.

Specified by:
close in interface RemoteIO.RemoteInputStreamRemote
Throws:
java.io.IOException - underlying input/output error
java.rmi.RemoteException - rpc failure