|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RemoteInputStream
Remote interface which allows exporting an InputStream-like interface over
the network. When combined with the RemoteInputStreamServer
subclasses on the server side and the RemoteInputStreamClient on
the client side, this class provides a true remote InputStream (in other
words, should never be used alone, use the utility classes).
Note that all methods on this interface are idempotent (when used correctly), and can therefore be retried as necessary in the face of RemoteExceptions.
An actual instance of this class is not intended for use by more than one client, and should be treated in a similar manner to an "un-synchronized" local interface.
| Method Summary | |
|---|---|
int |
available()
Returns the number of bytes that can be read from this stream without blocking. |
void |
close(boolean readSuccess)
Closes the input stream and releases the resources for this server object. |
byte[] |
readPacket(int packetId)
Reads the next chunk of data for this stream. |
long |
skip(long n,
int skipId)
Skips and discards up to the given number of bytes in the stream, and returns the actual number of bytes skipped. |
boolean |
usingGZIPCompression()
Returns true if the stream is using GZIP compression over
the wire. |
| Method Detail |
|---|
boolean usingGZIPCompression()
throws IOException,
RemoteException
true if the stream is using GZIP compression over
the wire.
true iff the stream data is compressed,
false otherwise
IOException
RemoteException
int available()
throws IOException,
RemoteException
IOException
RemoteException
void close(boolean readSuccess)
throws IOException,
RemoteException
readSuccess - true iff all data was read successfully
by the client, false otherwise
IOException
RemoteException
byte[] readPacket(int packetId)
throws IOException,
RemoteException
packetId - client specified id for this packet
IOException
RemoteException
long skip(long n,
int skipId)
throws IOException,
RemoteException
n - the number of bytes to skipskipId - client specified id for this skip attempt
IOException
RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||