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.
|
read
public FSPInputStream(FSPsession session, String filename)
session
- open session to target serverfilename
- filename for downloadpublic int available()
available
in class InputStream
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
public void mark(int readlimit)
mark
in class InputStream
readlimit
- ignoredpublic void reset()
If no mark method was called, rewind stream to zero.
reset
in class InputStream
public boolean markSupported()
markSupported
in class InputStream
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public long skip(long bytes) throws IOException
skip
in class InputStream
bytes
- number of bytes to be skippedIOException
Copyright © 2020 FSP Project. All rights reserved.