/** * Get the path encoded suitable for url like filesystem e.g. (http, webdav). * * @param charset the charset used for the path encoding * @return The encoded path. * @throws URIException If an error occurs encoding the URI. * @throws FileSystemException If some other error occurs. */ public String getPathQueryEncoded(final String charset) throws URIException, FileSystemException { if (getQueryString() == null) { if (charset != null) { return URIUtil.encodePath(getPathDecoded(), charset); } return URIUtil.encodePath(getPathDecoded()); } final StringBuilder sb = new StringBuilder(BUFFER_SIZE); if (charset != null) { sb.append(URIUtil.encodePath(getPathDecoded(), charset)); } else { sb.append(URIUtil.encodePath(getPathDecoded())); } sb.append("?"); sb.append(getQueryString()); return sb.toString(); }
/** * Get the path encoded suitable for url like filesystem e.g. (http, webdav). * * @param charset the charset used for the path encoding * @return The encoded path. * @throws URIException If an error occurs encoding the URI. * @throws FileSystemException If some other error occurs. */ public String getPathQueryEncoded(final String charset) throws URIException, FileSystemException { if (getQueryString() == null) { if (charset != null) { return URIUtil.encodePath(getPathDecoded(), charset); } return URIUtil.encodePath(getPathDecoded()); } final StringBuilder sb = new StringBuilder(BUFFER_SIZE); if (charset != null) { sb.append(URIUtil.encodePath(getPathDecoded(), charset)); } else { sb.append(URIUtil.encodePath(getPathDecoded())); } sb.append("?"); sb.append(getQueryString()); return sb.toString(); }
/** * Get the path encoded suitable for url like filesystem e.g. (http, webdav). * * @param charset the charset used for the path encoding * @return The encoded path. * @throws URIException If an error occurs encoding the URI. * @throws FileSystemException If some other error occurs. */ public String getPathQueryEncoded(final String charset) throws URIException, FileSystemException { if (getQueryString() == null) { if (charset != null) { return URIUtil.encodePath(getPathDecoded(), charset); } return URIUtil.encodePath(getPathDecoded()); } final StringBuilder sb = new StringBuilder(BUFFER_SIZE); if (charset != null) { sb.append(URIUtil.encodePath(getPathDecoded(), charset)); } else { sb.append(URIUtil.encodePath(getPathDecoded())); } sb.append("?"); sb.append(getQueryString()); return sb.toString(); }
return URIUtil.encodePath(getPathDecoded(), charset); return URIUtil.encodePath(getPathDecoded()); if (charset != null) sb.append(URIUtil.encodePath(getPathDecoded(), charset)); sb.append(URIUtil.encodePath(getPathDecoded()));