aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Please hellllllp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Please hellllllp" Watch "Please hellllllp" New topic
Author

Please hellllllp

Pratiti Naphade
Ranch Hand

Joined: Mar 13, 2001
Posts: 39
can u create an instance of filterinputstream...if yes how???
niraj singh
Ranch Hand

Joined: Feb 07, 2001
Posts: 36
FilterInputStream cannot be instantiated as it is an abstract class. It can only be subclasses. The following are types of FilterInputStream's -
DataInputStream
BufferedInputStream
LineNumberInputStream
PushbackInputStream
Pratiti Naphade
Ranch Hand

Joined: Mar 13, 2001
Posts: 39
It is not an abstract class...but yes its constructor is protected.
Paul Michael
Ranch Hand

Joined: Jul 02, 2001
Posts: 697
i tried looking at the api and noticed that its methods are very similar if not exactly the same with InputStream's methods... does anyone here know why they had to subclass InputStream with FilterInputStream without providing any new functionalities? please correct me if im wrong... thanks!


SCJP 1.2 (89%), SCWCD 1.3 (94%), IBM 486 (90%), SCJA Beta (96%), SCEA (91% / 77%), SCEA 5 P1 (77%), SCBCD 5 (85%)
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
HI Paul,
FilterInputStream and InputStream have major functionality differences. They might have the same method signatures but the method guts are completely different for at least 80% of the code!
Regards,
Manfred.
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
InputStream is abstract so I would assume that there might be at least one difference between them.
------------------
Tom - SCJP --- Co-Moderator of the Programmer Certification Forums


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Paul Michael
Ranch Hand

Joined: Jul 02, 2001
Posts: 697
thanks Manfred and Thomas! i should have checked the source files! now why didn't i think of that?? *scratches head* hehe thanks again!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Please hellllllp