Attaching a patch that makes the following changes:
- Use LoopingAlphabetStream and LoopingAlphabetReader instead of
ByteArrayInputStream and CharArrayReader so that the input data
arrays don't need to be materialized in memory.
- Close statements and result sets earlier to allow gc of old
- Use shared helper methods BaseTestCase.assertEquals(Reader,Reader)
and BaseTestCase.assertEquals(InputStream,InputStream). These also
ensure that the readers and streams are closed.
- Added new helper methods to ByteAlphabet and CharAlphabet to make
it easier to create alphabets consisting of a single value.
Without the patch, TriggerTest fails with an OutOfMemoryError when I
give it 140 MB of heap. With the patch, it completes successfully with
110 MB of heap.