public WritableArchive createArchive(String protocol, File path) throws java.io.IOException { try { /* *Use the expanded constructor so illegal characters (such as embedded blanks) in the path *will be encoded. */ return createArchive(protocol, prepareArchiveURI(path)); } catch(java.net.URISyntaxException e) { return null; } }
public WritableArchive createArchive(File path) throws java.io.IOException { try { /* *Use the expanded constructor so illegal characters (such as embedded blanks) in the path *will be encoded. */ return createArchive(prepareArchiveURI(path)); } catch(java.net.URISyntaxException e) { return null; } }
public ReadableArchive openArchive(File path) throws java.io.IOException { try { return openArchive(prepareArchiveURI(path)); } catch(java.net.URISyntaxException e) { return null; } }
/** * It first consults {@link ReadableArchiveFactory} to get an archive, if it does not get then delegates to * {@link #openArchive(java.net.URI)}. * @param path Application archive, never null * @param properties property bag, can contain for example deploy time properties. Never null * @return Gives {@link ReadableArchive}. * @throws IOException */ public ReadableArchive openArchive(File path, DeployCommandParameters properties) throws IOException { URI uri; try { uri = prepareArchiveURI(path); } catch (URISyntaxException e) { return null; } for (ReadableArchiveFactory fac : habitat.getAllByContract(ReadableArchiveFactory.class)) { //get the first ReadableArchive and move ReadableArchive archive=null; try{ archive = fac.open(uri, properties); }catch(Exception e){ //ignore? } if(archive == null) continue; return archive; } return openArchive(path); }