public class FSPInputStream extends InputStream
InputStream| Constructor and Description |
|---|
FSPInputStream(FSPsession session,
String filename)
creates a new Input stream for reading file from FSP server
|
| Modifier and Type | Method and Description |
|---|---|
int |
available()
returns the number of bytes that can be read from this input stream
without contacting server.
|
void |
close()
frees internal buffers.
|
void |
mark(int readlimit)
marks current position in the stream.
|
boolean |
markSupported()
returns true - mark is supported.
|
int |
read()
reads next byte from stream or -1 if EOF
|
int |
read(byte[] b,
int off,
int len)
reads data from FSP stream
|
void |
reset()
Repositions this stream to the position at the time the mark method was last called on this input stream.
|
long |
skip(long bytes)
skips n bytes in input stream.
|
readpublic FSPInputStream(FSPsession session, String filename)
session - open session to target serverfilename - filename for downloadpublic int available()
available in class InputStreampublic void close()
close in interface Closeableclose in interface AutoCloseableclose in class InputStreampublic void mark(int readlimit)
mark in class InputStreamreadlimit - ignoredpublic void reset()
If no mark method was called, rewind stream to zero.
reset in class InputStreampublic boolean markSupported()
markSupported in class InputStreampublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic long skip(long bytes)
throws IOException
skip in class InputStreambytes - number of bytes to be skippedIOExceptionCopyright © 2019 FSP Project. All rights reserved.