public long getLength() throws IOException { return rais.getLength(); }
/** * Return the number of bytes that are available for reading, that is: {@link #getLength()} - {@link #getOffset()} - 1. * Since <code>InputStream.available()</code> returns an int and this method overrides it, a maximum of * <code>Integer.MAX_VALUE</code> can be returned, even if this stream has more bytes available. * * @return the number of bytes that are available for reading. * @throws IOException if something went wrong */ @Override public int available() throws IOException { return (int)(getLength() - getOffset() - 1); }
long length = getLength();
long length = rais.getLength(); if(length<MIN_EOCD_SIZE) throw new ZipException("Invalid Zip file (too small)");
assert tempFile.getSize() == rais.getLength();