A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
I/O and Streams
converting output to input
Joined: Mar 29, 2005
Nov 18, 2008 07:41:00
What is the best way to convert either a Writer or an OutputStream to either a Reader or an InputStream? Just to be clear, what I`m looking for is the most efficient way to do *any one* of the following (not *all* of them):
- OutputStream => Reader
- OutputStream => InputStream
- Writer => Reader
- Writer => InputStream
Thanks in advance,
SCJP, SCJD, SCWCD
Joined: Oct 27, 2005
Nov 18, 2008 07:59:00
You mean that one class writes to the writer, and another class reads from the reader, and the writer and reader are linked?
That's just what PipedReader + PipedWriter or PipedInputStream / PipedOutputStream are for.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions
How To Answer Questions
I agree. Here's the link:
subject: converting output to input
File lock for Zip files in Java
How To Download and Recreate GIF Images?
I am getting junk, when trying file copy
create an OutPutStreamObject with out using files and which supports chinese characters
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014