How do you make a file shorter in java?
Say I want to open a RamdomAccessFile and delete the last 100 bytes, how do I just tell the system that the EOF should come 100 bytes before the end.
The seek method lets me seek past the end of the file and write something; thereby, making the file larger. But, I want to make it smaller without having to copy the entire file.
Is there a way to do this?