public class NotifyingBufferedInputStream extends BufferedInputStream
in| Constructor and Description |
|---|
NotifyingBufferedInputStream(InputStream is,
int size,
int chunkSize,
StreamListener listener)
Construct a notifying buffered inputstream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkNotification(int result)
Checks whether a notification is required and
notifies as appropriate
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
setStreamListener(StreamListener listener) |
available, close, mark, markSupported, reset, skipreadpublic NotifyingBufferedInputStream(InputStream is, int size, int chunkSize, StreamListener listener)
is - the input stream to be bufferedsize - the buffer sizechunkSize - the chunk sizelistener - the listener to notifyIllegalArgumentException - for a size <= 0 or chunkSize <= sizepublic void setStreamListener(StreamListener listener)
public int read()
throws IOException
read in class BufferedInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class BufferedInputStreamIOExceptionpublic void checkNotification(int result)
result - the number of bytes readCopyright © 2015 JBoss by Red Hat. All rights reserved.