public long skip(long pLength) throws IOException { long skipped = input.skipBytes(findMaxLen(pLength)); // Skips 0 or more, never -1 left -= skipped; return skipped; } }
public int read(final byte[] pBytes, final int pOffset, final int pLength) throws IOException { if (hasLength && left <= 0) { return -1; } int read = input.read(pBytes, pOffset, (int) findMaxLen(pLength)); if (hasLength) { left = read < 0 ? 0 : left - read; } return read; }
public int read(final byte[] pBytes, final int pOffset, final int pLength) throws IOException { if (hasLength && left <= 0) { return -1; } int read = input.read(pBytes, pOffset, (int) findMaxLen(pLength)); if (hasLength) { left = read < 0 ? 0 : left - read; } return read; }
public long skip(long pLength) throws IOException { long skipped = input.skipBytes(findMaxLen(pLength)); // Skips 0 or more, never -1 left -= skipped; return skipped; } }
public int read(final byte[] pBytes, final int pOffset, final int pLength) throws IOException { if (mHasLength && mLeft <= 0) { return -1; } int read = mInput.read(pBytes, pOffset, (int) findMaxLen(pLength)); if (mHasLength) { mLeft = read < 0 ? 0 : mLeft - read; } return read; }
public long skip(long pLength) throws IOException { long skipped = mInput.skipBytes(findMaxLen(pLength)); // Skips 0 or more, never -1 mLeft -= skipped; return skipped; } }