@Override public File getJarFile() throws IOException { return Files.urlToFile(url, "fabric-tmp-fab-", ".fab"); }
@Override public File getJarFile() throws IOException { return Files.urlToFile(url, "fabric-tmp-fab-", ".fab"); }
private static File toFile(Object value) throws IOException { if (value instanceof File) { return (File) value; } else if (value instanceof URL) { return Files.urlToFile((URL) value, "fabric-analyser-jar-", ".jar"); } else { throw new IllegalArgumentException("Cannot convert value " + value + " into a Resource. Expected File or URL"); } }
private static File toFile(Object value) throws IOException { if (value instanceof File) { return (File) value; } else if (value instanceof URL) { return Files.urlToFile((URL) value, "fabric-analyser-jar-", ".jar"); } else { throw new IllegalArgumentException("Cannot convert value " + value + " into a Resource. Expected File or URL"); } }
public static File urlToFile(String url, String tempFilePrefix, String tempFilePostfix) throws IOException { File file = new File(url); if (file.exists()) { return file; } else { return urlToFile(new URL(url), tempFilePrefix, tempFilePostfix); } }
/** * Lazily creates a File for the dependency if there is not a local file available */ public File getJarFile() throws IOException { if (jarFile == null) { URL url = getJarURL(); jarFile = Files.urlToFile(url, "fabric-tmp-fab-", ".jar"); } return jarFile; }
/** * Lazily creates a File for the dependency if there is not a local file available */ public File getJarFile() throws IOException { if (jarFile == null) { URL url = getJarURL(); jarFile = Files.urlToFile(url, "fabric-tmp-fab-", ".jar"); } return jarFile; }