public long length() throws IOException {
  if (inputStream == null) {
    throw new IOException("Stream closed");
  }
  return inputStreamCount + inputStream.available();
}

public long length ( ) throws IOException { if ( inputStream == null ) { throw new IOException ( "Stream closed" ) ; } return inputStreamCount + inputStream . available ( ) ; }
return how many bytes the input stream thinks make up the file . this is calculated by adding the number of bytes read to the number of bytes available . may not be reliable .
