1 Attachment(s)
[RESOLVED] Copying files with InputStream/OutputStream instead of Reader/Writer
My code is currently copying files using Reader/Writer but I need to do so using Input/Output Stream. How do I change my code to do that?
Re: Copying files with InputStream/OutputStream instead of Reader/Writer
Please post the code inside CODE tags instead of just a link - some here are reluctant to follow posted links.
The code in the copyFile method you supply is already using Input/Output streams - FileInputStream and FileOutputStream... the answer to your question is in your own code :rolleyes:
And simple truth miscalled simplicity,
W. Shakespeare
Re: Copying files with InputStream/OutputStream instead of Reader/Writer
Quote:
Originally Posted by
dlorde
Please post the code inside CODE tags instead of just a link - some here are reluctant to follow posted links.
The code in the copyFile method you supply is already using Input/Output streams - FileInputStream and FileOutputStream... the answer to your question is in your own code :rolleyes:
And simple truth miscalled simplicity,
W. Shakespeare
Okay I will next time =P
How about in my Main class? I used BufferedReader/Writer. I was told not to use Reader/Writer because some tests will fail.
Re: Copying files with InputStream/OutputStream instead of Reader/Writer
Quote:
Originally Posted by
Backslash
How about in my Main class? I used BufferedReader/Writer. I was told not to use Reader/Writer because some tests will fail.
OK, so what is stopping you switching to FileInputStream and FileOutputStream with BufferedInputStream and BufferedOutputStream? :confused:
Imagination is more important than knowledge...
A. Einstein