Streams question
- From: "Brian Fox" <brianfox@xxxxxxxxxxx>
- Date: Fri, 28 Oct 2005 22:54:05 GMT
Hi -
Is it safe/acceptable to build nested stream objects? If I nest a
FileInputStream inside a BufferInputStream for example, will this create
close() issues?
i.e.
InputStream myStream = new BufferedInputStream(new FileInputStream(myFile));
myStream.close();
-- versus --
InputStream fileStream = new FileInputStream(myFile);
InputStream bufStream = new BufferedInputStream(fileStream);
bufStream.close();
fileStream.close();
Is there a difference between these pieces of code?
Thanks,
Brian
.
- Prev by Date: Help with Java
- Next by Date: Re: help please
- Previous by thread: Help with Java
- Next by thread: Re: Streams question
- Index(es):