public interface IStreamThrottler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_rcsid |
Modifier and Type | Method and Description |
---|---|
void |
closeStream()
Note the stream being closed.
|
boolean |
obtainReadPermission(int byteCount)
Obtain permission to read a block of bytes.
|
boolean |
obtainReadPermission(int byteCount,
IBreakCheck breakCheck)
Obtain permission to read a block of bytes.
|
void |
releaseReadPermission(int origByteCount,
int actualByteCount)
Note the completion of the read of a block of bytes.
|
static final java.lang.String _rcsid
boolean obtainReadPermission(int byteCount) throws java.lang.InterruptedException
byteCount
- is the number of bytes to get permissions to read.java.lang.InterruptedException
boolean obtainReadPermission(int byteCount, IBreakCheck breakCheck) throws java.lang.InterruptedException, BreakException
byteCount
- is the number of bytes to get permissions to read.java.lang.InterruptedException
BreakException
void releaseReadPermission(int origByteCount, int actualByteCount)
origByteCount
- is the originally requested number of bytes to get permissions to read.actualByteCount
- is the number of bytes actually read.void closeStream()