public class XThreadInputStream extends InputStream
| Constructor and Description |
|---|
XThreadInputStream()
Constructor, from another source.
|
XThreadInputStream(InputStream sourceStream)
Constructor, from a given input stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Call this method to abort the stuffQueue() method.
|
int |
available()
Get available.
|
void |
close()
Close.
|
void |
doneStuffingQueue()
Call this method when there is no more data to write.
|
void |
mark(int readLimit)
Mark.
|
boolean |
markSupported()
Check if mark is supported.
|
int |
read()
Read a byte.
|
int |
read(byte[] b)
Read lots of bytes.
|
int |
read(byte[] b,
int off,
int len)
Read lots of specific bytes.
|
void |
reset()
Reset.
|
long |
skip(long n)
Skip
|
void |
stuffQueue()
This method is called from the helper thread side, to keep the queue
stuffed from the input stream.
|
void |
stuffQueue(byte[] byteBuffer,
int offset,
int amount)
This method is called from the helper thread side, to stuff bytes onto
the queue when there is no input stream.
|
public XThreadInputStream(InputStream sourceStream)
public XThreadInputStream()
public void abort()
public void stuffQueue(byte[] byteBuffer,
int offset,
int amount)
throws InterruptedException
InterruptedExceptionpublic void doneStuffingQueue()
public void stuffQueue()
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionpublic void mark(int readLimit)
mark in class InputStreampublic void reset()
throws IOException
reset in class InputStreamIOExceptionpublic boolean markSupported()
markSupported in class InputStreampublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOException