/** * @return the number of bytes that can be read (or skipped over) from this input stream without blocking by the * next caller of a method for this input stream. The next caller might be the same thread or another thread. * Note that although the next caller can read this many bytes without blocking, the available() method call itself * may block in order to fill an internal buffer if it has been exhausted. */ public int available() throws IOException { if (mCurrentBlock == null || mCurrentOffset == mCurrentBlock.length) { readBlock(); } if (mCurrentBlock == null) { return 0; } return mCurrentBlock.length - mCurrentOffset; }
/** * @return the number of bytes that can be read (or skipped over) from this input stream without blocking by the * next caller of a method for this input stream. The next caller might be the same thread or another thread. * Note that although the next caller can read this many bytes without blocking, the available() method call itself * may block in order to fill an internal buffer if it has been exhausted. */ @Override public int available() throws IOException { if (mCurrentBlock == null || mCurrentOffset == mCurrentBlock.mBlock.length) { readBlock(); } if (mCurrentBlock == null) { return 0; } return mCurrentBlock.mBlock.length - mCurrentOffset; }
/** * @return the number of bytes that can be read (or skipped over) from this input stream without blocking by the * next caller of a method for this input stream. The next caller might be the same thread or another thread. * Note that although the next caller can read this many bytes without blocking, the available() method call itself * may block in order to fill an internal buffer if it has been exhausted. */ @Override public int available() throws IOException { if (mCurrentBlock == null || mCurrentOffset == mCurrentBlock.mBlock.length) { readBlock(); } if (mCurrentBlock == null) { return 0; } return mCurrentBlock.mBlock.length - mCurrentOffset; }
/** * @return the number of bytes that can be read (or skipped over) from this input stream without blocking by the * next caller of a method for this input stream. The next caller might be the same thread or another thread. * Note that although the next caller can read this many bytes without blocking, the available() method call itself * may block in order to fill an internal buffer if it has been exhausted. */ @Override public int available() throws IOException { if (mCurrentBlock == null || mCurrentOffset == mCurrentBlock.getUncompressedBlock().length) { readBlock(); } if (mCurrentBlock == null) { return 0; } return mCurrentBlock.getUncompressedBlock().length - mCurrentOffset; }
mBlockAddress = compressedOffset; mLastBlockLength = 0; readBlock(); available = available();
mFile.seek(compressedOffset); mStreamOffset = compressedOffset; readBlock(); available = available();