byte[] download(File f) { if (!f.exists()) { IJ.error("Plugin Installer", "File not found: " + f); return null; } byte[] data = null; try { int len = (int) f.length(); InputStream in = new BufferedInputStream(new FileInputStream(f)); DataInputStream dis = new DataInputStream(in); data = new byte[len]; dis.readFully(data); dis.close(); } catch (Exception e) { IJ.error("Plugin Installer", "" + e); data = null; } return data; }