public void escribirComprasXStream(String rutaFichero, LinkedHashMap<Integer, Compra> compras) {
        XStream xstream = new XStream();
        rutaFichero = rutaFichero + ".xml";
        try {
            xstream.toXML(compras, new FileOutputStream(rutaFichero));
        } catch (Exception e) {
            //e.printStackTrace();
            System.out.println("Error en escibirComprasXStream");
        }
    }