The number of character to be remove at the beginning of the String to replace; in most of the case it's the path to the whole folder that will be exposed.
Sometimes the object of the statement containing the original source of the Document is a Resource (since an URL might be an URI); in this case this parameter has to be true.
When encoding a URL it's needed to use the encoding used by the server for URL encoding; otherwise some file might never be exposed (especially files containing accent in their name or other
complex characters).