private ByteBuffer convertToBuffer(final Packet element) throws IOException {
    final ByteBuffer buffer;
    if (element instanceof SnoopPacketImpl) {
      final AFilePacket p = (AFilePacket) element;
      final ByteBuffer old = p.getRecordByteBuffer();
      if (old.order() == this.editor.order()) {
        buffer = BufferUtils.slice(old);
      } else {
        throw new IllegalArgumentException(
            "Supplied packet buffer is not in BIG_ENDIAN order. "