Here you can find the source of createUri(final String path)
public static String createUri(final String path)
//package com.java2s; /*/*w ww . j ava 2s . c om*/ * Copyright 2000-2013 Enonic AS * http://www.enonic.com/license */ import java.io.UnsupportedEncodingException; import java.net.URLEncoder; public class Main { private static final String DUMMY_PREFIX = "dummy:/"; public static String createUri(final String path) { if (path.contains(":/")) { return path; } try { return DUMMY_PREFIX + URLEncoder.encode(path, "UTF-8"); } catch (final UnsupportedEncodingException e) { throw new AssertionError(e); } } }