| Author |
InputStream,how to use
|
linus dale
Ranch Hand
Joined: Jul 01, 2009
Posts: 44
|
|
why is this line correct
i is of class InputStream,how can it become object of FileInputStream
generally we write
or
Also is there a class like FileInputStreamReader
or FileInputStreamWriter
or FileOutputStreamReader
or FileOutputStreamWriter
|
 |
Ulises Pulido
Ranch Hand
Joined: Jul 24, 2008
Posts: 81
|
|
Is correct because InputStream is a superclass of FileInputStream.
You can assign directly a reference of a child class to a parent class.
As far as I know there are not such classes you are asking for
But there are FileReader and FileWriter.
|
SCJP 5.0, SCWCD 5.0, SCBCD 5.0, SCJD, SCEA in progress
www.ulisespulido.com
|
 |
linus dale
Ranch Hand
Joined: Jul 01, 2009
Posts: 44
|
|
Ulises Pulido wrote:Is correct because InputStream is a superclass of FileInputStream.
You can assign directly a reference of a child class to a parent class.
As far as I know there are not such classes you are asking for
But there are FileReader and FileWriter.
thanks
|
 |
 |
|
|
subject: InputStream,how to use
|
|
|