posted 24 years ago
I am refering "The Complete Reference" 4 I/O . Here while creating a instance of the FileInputStream its is written
InputStream f = new FileInputStream("filename.ext")//is this wrong?
AND NOT
**FileInputStream f = new FileInputStream("filename.ext");**
I dont understand y and how?
BUT on the contrary ByteArrayInputStream is instansiated as expected ie
**ByteArrayInputStream b = new ByteArrayInputStream(buf);**
My Question is can I instansiate ByteArrayInputStream like this:
**InputStream b = new ByteArrayInputStream(buf);**
AND PushbackinputStream which has a constructor like this:
**PushbackinputStream(InputStream is,int numbytes)
while instansiating it instead of passing a object of a InputStream as the first argument an object of a ByteArrayInputStream is passed
again y? and wat r the rules 4 doing such a thing can i do this with any constructor.(R there long code questions on I\O in the paper coz i heard that knowing all the constructors properly sud be enough or will i need to write some codes myself??)
AMIT ROY
<I>Chance Favours the Prepared minds"</I>