which is possible parameter that can be passed into the construcor of a FilterInputStream FilterInputStream(InputStream in) a.File b.PrintStream c.FileOutputStream d.FileInputStream e.RandomAccessFile Ans is "d" I see it in API is FilterInputStream(InputStream in) Why "a" is not right?
File is not a subclass of InputStream.that is the reason. hope this helps.
Joined: Nov 25, 2001
OH thanks~1 AudioInputStream, ByteArrayInputStream, FileInputStream, FilterInputStream, InputStream, ObjectInputStream, PipedInputStream, SequenceInputStream, StringBufferInputStream is all of InputStream's subclass in API 1.3 And can we say all of above can be passed into the construcor of a FilterInputStream?
Joined: Oct 08, 2001
i think it can be done. quote from api about FilterInuputStream. A FilterInputStream contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.