aboutsip / pkts

Pure java based pcap library capable of reading and writing to/from pcaps.
Other
198 stars 92 forks source link

InputStreamBuffer seems to be vestigial #76

Open epall opened 6 years ago

epall commented 6 years ago

It appears that io.pkts.buffer.InputStreamBuffer has been replaced by io.pkts.buffer.BoundedInputStreamBuffer in all usage. Given how similar the two classes are, does it make sense to delete the vestigial io.pkts.buffer.InputStreamBuffer? If not, can we extract a superclass to reduce duplication?

I ask because I'm poking around with why my code is slow, and it turns out that Buffer.readBytes(int) calls are forwarded all the way down to a low-level Channel that's really inefficient for short reads, so I want to find some place to buffer a few KB.