I would like to make a subclass of FilterInputStream
that will overload some of the methods of FilterInputStream
. It will filter the input stream, which is a sequence of numbers given by the user (we don't know how long this sequence is) in which every number that is given consecutively will be written only once.
For example, given the input
1,2,3,3,3,4,5,5,6,7,10,10,15,16,16
the output should be
1,2,3,4,5,6,7,10,15,16
Can you tell me which classes should be overloaded and which not? I don't know if I need instance variables or just a constructor? I have to use ByteArryInputStream
also--not Reader
or Writer
.