| java.lang.Object java.io.InputStream org.apache.james.util.SchedulerNotifyInputStream
SchedulerNotifyInputStream | public class SchedulerNotifyInputStream extends InputStream (Code) | | This will reset the scheduler each time a certain amount of data has
been transfered. 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() |
lengthReset | int lengthReset(Code) | | The number of bytes that need to be read before the counter is reset.
|
readCounter | int readCounter(Code) | | The number of bytes read since the counter was last reset
|
scheduler | TimeScheduler scheduler(Code) | | The scheduler managing the trigger to be reset by this stream
|
triggerName | String triggerName(Code) | | The name of the trigger
|
SchedulerNotifyInputStream | public SchedulerNotifyInputStream(InputStream in, TimeScheduler scheduler, String triggerName, int lengthReset)(Code) | | Parameters: in - the InputStream to be wrapped by this stream Parameters: scheduler - the TimeScheduler managing the trigger to be reset by this stream Parameters: triggerName - the name of the particular trigger to be reset by this stream 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 |
|
|