code: private long getCurrentPosition() {
          long pos;
          if (!useLoadBuf) {
              return in.position();
          }
          try {
              if (in != null) {
                  pos = (channel.position() - in.remaining());
              } else {
                  pos = channel.position();
              }
              return pos;
          } catch (Exception e) {
              log.error("Error getCurrentPosition", e);
              return 0;
          }
      }
docs: Get the current position in a file or ByteBuffer.
  
  @return Current position in a file