code: private int readerLength(File file, InputStreamReader isr)
  	{
  		String name = file.getName();
  
  		if (name.endsWith(".docx"))
  		{
  			return ((DocxStreamReader) isr).length();
  		} else if (name.endsWith(".odt"))
  		{
  			return ((ODFStreamReader) isr).length();
  		} else
  		{
  			return (int) (file.length() + 1);
  		}
  	}
docs: Calculate the length to allocate for a given file/stream.