public ElfByteChannel position()

in java/com/facebook/soloader/ElfZipFileChannel.java [54:78]


  public ElfByteChannel position(long newPosition) throws IOException {
    if (mIs == null) {
      throw new IOException(mZipEntry.getName() + "'s InputStream is null");
    }

    if (newPosition == mPos) {
      return this;
    }

    if (newPosition > mLength) {
      newPosition = mLength;
    }
    if (newPosition >= mPos) {
      mIs.skip(newPosition - mPos);
    } else {
      mIs.close();
      mIs = mZipFile.getInputStream(mZipEntry);
      if (mIs == null) {
        throw new IOException(mZipEntry.getName() + "'s InputStream is null");
      }
      mIs.skip(newPosition);
    }
    mPos = newPosition;
    return this;
  }