Would this be slightly simpler by extending java.io.FilterInputStream?