Hello
I am trying to use RandomAccessFile to read and write big binary file
A.dat by parts of 4Mb and write in into file
B.dat (by parts too)... But my problem is I get wrong file
B.dat length and its data is corrupted.
For example
- file
A.dat length is 17.3Mb
- then I write file
B.dat with 16Mb length but it should be totally like
A.dat (17.3Mb) because I just want to copy
A.dat with RandomAccessFile into
B.dat
I know I should work around position or seek but I have no idea how to get correct file B length and correct file content.
The problem is I want to copy big files which can be copied by parts so I need to use RandomAccessFile only...
Please give me an example how to use RandomAccessFile in such a case being able to copy file A to file B correctly?
Please help...