class PcapDumper implements Closeable {

  public long ftell() throws PcapNativeException, NotOpenException {
    if (!open) {
      throw new NotOpenException();
    }

    NativeLong nposition;
    if (!dumperLock.readLock().tryLock()) {
      throw new NotOpenException();
    }
    try {
      if (!open) {
        throw new NotOpenException();
      }
      nposition = NativeMappings.pcap_dump_ftell(dumper);
    } finally {
      dumperLock.readLock().unlock();
    }

    long position = nposition.longValue();
    if (position < 0) {
      throw new PcapNativeException("Failed to get the file position.");
    }

    return position;
  }

    PcapDumper(Pointer dumper, TimestampPrecision timestampPrecision);

}