Creates and allocates a memory URL

@param entryName
name of the entry
@param entry
byte array of the entry
@return the created URL or null if an error occurs.
519433
public static URL createMemoryURL(final String entryName, final byte[] entry) {
		try {
			final Class c = ClassLoader.getSystemClassLoader().loadClass(
					"org.allcolor.yahp.converter.CMemoryURLHandler");
			final Method m = c.getDeclaredMethod("createMemoryURL",
					new Class[] { String.class, byte[].class });
			m.setAccessible(true);
			return (URL) m.invoke(null, new Object[] { entryName, entry });
		} catch (final Exception ignore) {
			ignore.printStackTrace();
			return null;
		}
	}
1095691
@Override
    public FatLfnDirectoryEntry getEntry(String name) {
        name = name.trim().toLowerCase(Locale.ROOT);
        
        final FatLfnDirectoryEntry entry = longNameIndex.get(name);
        
        if (entry == null) {
            if (!ShortName.canConvert(name)) return null;
            return shortNameIndex.get(ShortName.get(name));
        } else {
            return entry;
        }
    }
934680
private static String buildUrlWithQueryString(String url, Map<String, String> queryParas) {
		if (queryParas == null || queryParas.isEmpty())
			return url;
		
		StringBuilder sb = new StringBuilder(url);
		boolean isFirst;
		if (!url.contains("?")) {
			isFirst = true;
			sb.append("?");
		}
		else {
			isFirst = false;
		}
		
		for (Entry<String, String> entry : queryParas.entrySet()) {
			if (isFirst) isFirst = false;	
			else sb.append("&");
			
			String key = entry.getKey();
			String value = entry.getValue();
			if (StrKit.notBlank(value))
				try {value = URLEncoder.encode(value, CHARSET);} catch (UnsupportedEncodingException e) {throw new RuntimeException(e);}
			sb.append(key).append("=").append(value);
		}
		return sb.toString();
	}
606917
public final URL getResourceURL(String name) {
		URL url = loadResourceURL(name);
		if (url == null && subLoaders != null)
			for (AbstractClassLoader sub : subLoaders) {
				url = sub.getResourceURL(name);
				if (url != null) break;
			}
		return url;
	}
906068
private ITemplateSourceEntry addJarEntry(Map<String, ITemplateSourceEntry> entries, JarEntry jarEntry) {
		String name = jarEntry.getName().substring(basePathLength);
		if(name.isEmpty()) {
			name = "/";
		}

		ITemplateSourceEntry entry = new JarTemplateSourceEntry(name, jarEntry);
		entries.put(name, entry);
		return entry;
	}
1300612
@Override
    public void addURL(URL url)
    {
        this.finder.addURI(URI.create(url.toExternalForm()));
    }
418249
public static void serializeEntry(final Entry entry, final Writer writer) throws IllegalArgumentException, FeedException, IOException {

        // Build a feed containing only the entry
        final List<Entry> entries = new ArrayList<Entry>();
        entries.add(entry);
        final Feed feed1 = new Feed();
        feed1.setFeedType("atom_1.0");
        feed1.setEntries(entries);

        // Get Rome to output feed as a JDOM document
        final WireFeedOutput wireFeedOutput = new WireFeedOutput();
        final Document feedDoc = wireFeedOutput.outputJDom(feed1);

        // Grab entry element from feed and get JDOM to serialize it
        final Element entryElement = feedDoc.getRootElement().getChildren().get(0);

        final XMLOutputter outputter = new XMLOutputter();
        outputter.output(entryElement, writer);
    }
315642
def get_namespace_entry(self, url: str, name: str) -> Optional[NamespaceEntry]:
        
        entry_filter = and_(Namespace.url == url, NamespaceEntry.name == name)
        result = self.session.query(NamespaceEntry).join(Namespace).filter(entry_filter).all()

        if 0 == len(result):
            return

        if 1 < len(result):
            log.warning('result for get_namespace_entry is too long. Returning first of %s', [str(r) for r in result])

        return result[0]
565098
public String getRedirectUrl() throws XMLStreamException, IOException {
		String url = this.settings.getIdpSsoTargetUrl();
		url += "?SAMLRequest=";

		url += URLEncoder.encode(this.getXmlBase64Request(), "UTF-8");

		if (this.parameters != null) {
			for (Map.Entry<String, String> param : this.parameters.entrySet()) {
				String key = URLEncoder.encode(param.getKey(), "UTF-8");
				String val = URLEncoder.encode(param.getValue(), "UTF-8");
				url += "&" + key + "=" + val;
			}
		}

		return url;
	}
600071
public JPAEntry getEntry(String entryKey) {
        for (JPAEntry entry : entries) {
            if (entry.getKey().equals(entryKey)) {
                return entry;
            }
        }
        return null;
    }
620355
public static URL constructResourceURL(Class<?> c, String resName) {
		String strUrl = "";

		if (resName.startsWith("/")) // 资源名称以"/"开头，从类所在的Class Path根目录开始定位资源
			strUrl = getClassRootPath(c) + resName.substring(1);
		else
			// 资源名称不以"/"开头，从类所在的目录开始定位资源
			strUrl = getClassPath(c) + resName;

		try {
			return new URL(strUrl);
		} catch (Exception e) {
			return null;
		}
	}
338977
public static URL createURL(String str) throws ParseException
    {
        try
        {
            return new URL(str);
        }
        catch (MalformedURLException e)
        {
            throw new ParseException("Unable to parse the URL: " + str);
        }
    }
463215
public OkRequest<T> param(final Map.Entry<String, String> entry) {
        return param(entry.getKey(), entry.getValue());
    }
586472
def get_annotation_entry_names(self, url: str) -> Set[str]:
        
        annotation = self.get_or_create_annotation(url)
        return {
            x.name
            for x in self.session.query(NamespaceEntry.name).filter(NamespaceEntry.namespace == annotation)
        }
1269864
public static String getString(final LdapEntry entry, final String attribute) {
        return getString(entry, attribute, null);
    }
611443
public Link createLink(String name, String url, boolean onMenu) {
        return getInstance().create().link(name, this, url, onMenu);
    }
1280596
public AssemblyResponse getAssemblyByUrl(String url)
            throws RequestException, LocalOperationException {
        Request request = new Request(this);
        return new AssemblyResponse(request.get(url));
    }