My app writes loads of bytes constantly to a file. If a block of my code is writing out bytes and gets an IOException if the connection to the drive or network is lost how am I to know how many bytes it has written?
For eg I'm writing 2500 bytes at a time and if an IOException occurs does it mean it wrote nothing to the file or it would have written partial bytes to the file? If partial bytes are written to the file how am I to know how much is written
FYI I'm using
DataOutputStream
to write out files. I flush only when my app closes.