public <T extends InputCapture<? extends FilePacket>> T newInput(
final Class<T> t, final ReadableByteChannel in,
final Filter<ProtocolFilterTarget> filter) throws IOException {
if (t == PcapInput.class) {
final BufferedReadableByteChannel b = new BufferedReadableByteChannel(in);
b.mark(4);
ByteOrder order = PcapInputCapture.checkFormat(b);
b.reset();
return t.cast(new PcapInputCapture(b, order, filter));