[Solved] Two streams and one file

It depends on your operating system. On Windows the new FileOutputStream(…) will probably fail. On Unix-line systems you will get a new file while the old one continues to be readable. However your copy loop is invalid. available() is not a test for end of stream, and it’s not much use for other purposes either. … Read more