fileOut.write(p.sysex);
for (int i = 0; i < msgs.length; i++) fileOut.write(msgs[i].getMessage(),0,msgs[i].getLength());
    public void exportPatch(File file) throws IOException, FileNotFoundException {        if (!checkSelected()) return;        Patch p = getSelectedPatch();        FileOutputStream fileOut = new FileOutputStream(file);        fileOut.write(p.sysex);        fileOut.close();    }