The moose likes I/O and Streams and the fly likes reading from inputstreams and writing .... Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Reply Bookmark "reading from inputstreams and writing ...." Watch "reading from inputstreams and writing ...." New topic
Author

reading from inputstreams and writing ....

mark stone
Ranch Hand

Joined: Dec 18, 2001
Posts: 417
how to write -- what we have read from an inputstream ?
eg there are classes like url, urlconnection etc which give you an inputstream. i need to be able to write that information that is being read from the InputStream.
I am able to write to the standard output ok, but i want to write into a file instead.
where inp is InputStream,
while( (ii = inp.read()) != -1 )
{System.out.print( (char)ii );} }
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
FileOutputStream or FileWriter!
 
 
subject: reading from inputstreams and writing ....
 
Threads others viewed
How to encode image in parts?
save image file from remote URL
writing to Text file.
over writing a file on server
Additional byte when reading from OutputStream
MyEclipse, The Clear Choice