public interface FilterBuffer { // returns current contents of buffer and clears it. Returns a zero-length // array if its internal buffer is empty and the FilterBuffer has been closed char[] read (); // write str to buffer if str.length is less than maxBufferSize, // otherwise throws exception void write(char[] str) throws bufTooSmallException; int getMaxBufferSize(); // informs the FilterBuffer that no more data will be written to it void close(); // doesn't return until the buffer is empty void flush(); }