Fixing FileChannel.truncate() / position()

According to the docs, after calling truncate(x), if position() > x, position()
should be made to equal x. Note: It is to be set to x, not to the actual size
of the file, since truncate() doesn't actually grow the file. Subsequent writes
will grow the file to position().

Bug: 12757843
Change-Id: I5df1fbd59f1a8610bc60575dfa7f1396baf3ed47
3 files changed