| Author |
To avoid writing to disk (memory I/O stream)
|
Viktor Stolbin
Greenhorn
Joined: Apr 14, 2007
Posts: 9
|
|
I've got a problem. I need to avoid writing a file to disk in anyway. Instead I need to use some way of memory representation of a file. Is there a output stream class that I can use to prevent disk writing at all?
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24081
|
|
|
Check out ByteArrayOutputStream and/or StringWriter.
|
[Jess in Action][AskingGoodQuestions]
|
 |
Arnold Reuser
Ranch Hand
Joined: Nov 20, 2003
Posts: 193
|
|
Jakarta Commons IO is a library of utilities to assist with developing IO functionality. IOUtils.toByteArray(Reader input) will return an in-memory representation of your file as a byte array.
|
 |
 |
|
|
subject: To avoid writing to disk (memory I/O stream)
|
|
|