Package tv.hd3g.transfertfiles.ftp
Class StoppableInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- tv.hd3g.transfertfiles.ftp.StoppableInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class StoppableInputStream extends FilterInputStream
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description StoppableInputStream(InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()booleanisStopped()intread()intread(byte[] b)intread(byte[] b, int off, int len)byte[]readAllBytes()intreadNBytes(byte[] b, int off, int len)byte[]readNBytes(int len)voidsetStop()longskip(long n)-
Methods inherited from class java.io.FilterInputStream
close, mark, markSupported, reset
-
Methods inherited from class java.io.InputStream
nullInputStream, transferTo
-
-
-
-
Constructor Detail
-
StoppableInputStream
public StoppableInputStream(InputStream in)
-
-
Method Detail
-
setStop
public void setStop()
-
read
public int read() throws IOException- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
public int read(byte[] b) throws IOException- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classFilterInputStream- Throws:
IOException
-
readAllBytes
public byte[] readAllBytes() throws IOException- Overrides:
readAllBytesin classInputStream- Throws:
IOException
-
readNBytes
public int readNBytes(byte[] b, int off, int len) throws IOException- Overrides:
readNBytesin classInputStream- Throws:
IOException
-
readNBytes
public byte[] readNBytes(int len) throws IOException- Overrides:
readNBytesin classInputStream- Throws:
IOException
-
skip
public long skip(long n) throws IOException- Overrides:
skipin classFilterInputStream- Throws:
IOException
-
available
public int available() throws IOException- Overrides:
availablein classFilterInputStream- Throws:
IOException
-
isStopped
public boolean isStopped()
-
-