/** * Returns the relative path of this entry, with respect to the archive file. The path separator of the returned * path is the one returned by {@link #getSeparator()}. As a relative path, the returned path does not start * with a separator character. * * @return the relative path of this entry, with respect to the archive file. */ public String getRelativeEntryPath() { String path = entry.getPath(); // Replace all occurrences of the entry's separator by the archive file's separator, only if the separator is // not "/" (i.e. the entry path separator). String separator = getSeparator(); if(!separator.equals("/")) path = path.replace("/", separator); return path; }