IO improvements to DiskCache and UnifiedAST.

- Renamed "writeTo" to "transferToStream" to avoid the confusion that it actually does the opposite of the other "write" methods, and added its inverse "transferFromStream".

- Factored out moveToEndPosition() which fixes a bug where atEnd would *never* be true, forcing an unnecessary seek on every write.

- Updated some call sites to take advantage of transferFromStream(), which is more efficient than buffering the whole data stream into a byte buffer.

- Updated UnifiedAST to take advantage of DiskCache and the newer serialization techniques, which should reduce memory usage.

Review by: spoon



git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@6511 8db76d5a-ed1c-0410-87a9-c151d255dfc7
4 files changed