}
}
private URL getBeanXmlUrl(Archive archive, String beansXmlPath)
{
final Node beansXml = archive.get(beansXmlPath);
if (beansXml == null)
{
return null;
}
try
{
String urlLocation = "archive://" + archive.getName() + "/" + beansXmlPath;
return new URL(null, urlLocation, new URLStreamHandler()
{
@Override
protected URLConnection openConnection(URL u) throws IOException
{
return new URLConnection(u)
{
@Override
public void connect() throws IOException
{}
@Override
public InputStream getInputStream() throws IOException
{
return beansXml.getAsset().openStream();
}
};
};
});
}