| java.lang.Object java.io.InputStream org.apache.james.util.watchdog.BytesReadResetInputStream
BytesReadResetInputStream | public class BytesReadResetInputStream extends InputStream (Code) | | This will reset the Watchdog each time a certain amount of data has
been transferred. This allows us to keep the timeout settings low, while
not timing out during large data transfers.
|
Method Summary | |
public void | close() | public int | read(byte[] b, int off, int len) | public int | read() |
readCounter | int readCounter(Code) | | The number of bytes read since the counter was last reset
|
BytesReadResetInputStream | public BytesReadResetInputStream(InputStream in, Watchdog watchdog, int lengthReset)(Code) | | Parameters: in - the InputStream to be wrapped by this stream Parameters: watchdog - the watchdog to be reset Parameters: lengthReset - the number of bytes to be read in between trigger resets |
read | public int read(byte[] b, int off, int len) throws IOException(Code) | | Read an array of bytes from the stream
Parameters: b - the array of bytes to read from the stream Parameters: off - the index in the array where we start writing Parameters: len - the number of bytes of the array to read the number of bytes read throws: IOException - if an exception is encountered when reading |
read | public int read() throws IOException(Code) | | Read a byte from the stream
the byte read from the stream throws: IOException - if an exception is encountered when reading |
|
|