protected void assinarGravar() throws IOException, KeyStoreException{
        int index = gCrlv.getTableGerenciarCrlvs().getSelectionModel().getLeadSelectionIndex();
        if(index > -1){
            XStream xstream = new XStream();
            ModelCRLV c = gCrlv.getCrlv().get(index);
            String xml = xstream.toXML(c);
            
             File f = new File("xmls/", c.getCodRenavam()+".xml");
            if(f.exists())
                f.delete();
        
            f.createNewFile();

            FileWriter x = new FileWriter(f, true);
            x.write("<?xml version =  \"1.0\" encoding=\"UTF-8\"?>\n" +xml);
            x.close();
            
            ModelSigner model = new ModelSigner();
            ViewSigner vs = new ViewSigner(model);
            ControllerSigner cs = new ControllerSigner(vs, c.getCodRenavam(), true);
            mw.getDesktop().add(vs);
            vs.setVisible(true);
        }
        else
            JOptionPane.showMessageDialog(mw, "Selecione um documento para ser assinado!");
    }