public class ServerInputStream extends java.lang.Object implements ServerStream
InputStream as
ServerStream which allows for keeping an
InputStream locally and use it remotely.| Constructor and Description |
|---|
ServerInputStream(java.io.InputStream in)
Creates a new
ServerInputStream providing the content of the
designated stream incrementally on client side. |
| Modifier and Type | Method and Description |
|---|---|
int |
available()
InputStream.available() |
void |
close()
InputStream.close()
This additionally removes the skeleton in the communication framework. |
void |
mark(int readlimit)
InputStream.mark(int) |
boolean |
markSupported()
InputStream.markSupported() |
int |
read()
InputStream.read() |
byte[] |
read(int len)
Resembles
InputStream.read(byte[]) by reading the
designated amount of bytes from the stream. |
void |
reset()
InputStream.reset() |
long |
skip(long n)
InputStream.skip(long) |
public ServerInputStream(java.io.InputStream in)
ServerInputStream providing the content of the
designated stream incrementally on client side. Note that this stream as
well as the wrapped InputStream will be closed by the remote
site. Therefore you should only close this stream (or the wrapped
InputStream) if you are sure that the remote side has not
closed it and will not close it, for instance since it disconnected
abruptly.in - The stream of which the content will be provided incrementally on
client side. This stream will be closed by the remote side.public int read()
throws java.io.IOException
ServerStreamInputStream.read()read in interface ServerStreamjava.io.IOExceptionpublic byte[] read(int len)
throws java.io.IOException
ServerStreamInputStream.read(byte[]) by reading the
designated amount of bytes from the stream. If there are less bytes
remaining in the stream, the returned byte array will be correspondingly
shorter. If no bytes remain (java.io.InputStream#read(byte[])
returns -1), null will be returned.read in interface ServerStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
ServerStreamInputStream.skip(long)skip in interface ServerStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
ServerStreamInputStream.available()available in interface ServerStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
ServerStreamInputStream.close()
This additionally removes the skeleton in the communication framework.close in interface ServerStreamjava.io.IOExceptionpublic void mark(int readlimit)
ServerStreamInputStream.mark(int)mark in interface ServerStreampublic void reset()
throws java.io.IOException
ServerStreamInputStream.reset()reset in interface ServerStreamjava.io.IOExceptionpublic boolean markSupported()
ServerStreamInputStream.markSupported()markSupported in interface ServerStream