InputStream fileIn = driver.getClass() .getResourceAsStream(fileName); fileIn.read(buffer); fileIn.close(); return driver.createPatch(buffer);
InputStream fileIn = driver.getClass().getResourceAsStream(fileName);  if (fileIn != null) { fileIn.read(buffer); fileIn.close(); return driver.createPatch(buffer); } else { throw new FileNotFoundException("File: " + fileName + " does not exist!"); }
    public static IPatch createNewPatch(IPatchDriver driver, String fileName,            int size) { // Borrowed from DR660 driver        byte[] buffer = new byte[size];        try {            InputStream fileIn = driver.getClass()                    .getResourceAsStream(fileName);            fileIn.read(buffer);            fileIn.close();            return driver.createPatch(buffer);        } catch (IOException e) {            ErrorMsg.reportError("Error", "Unable to open " + fileName, e);            return null;        }    }