/**
EDITAR LA DIRECCION DEL ARCHIVO DE TEXTO EL CUAL SERA NUESTRA SALIDA DEL PROGRAMA
**/
FileOutputStream salida = new FileOutputStream("C:/Users/GABY/Desktop/GananciasGas.txt");
BufferedOutputStream buf = new BufferedOutputStream(salida);
leo = entra.read(arreglo,0,arreglo.length);
contados = leo;
//realiza la lectura de los datos
do {
leo =entra.read(arreglo, contados, (arreglo.length-contados));
if(leo >= 0) contados += leo;
} while(leo > -1);
buf.write(arreglo, 0 , contados);//lo escribe en el buffer
buf.flush();//limpia la memoria del buffer
/**
EDITAR LA DIRECCION DEL ARCHIVO DE TEXTO AL CUAL LE DAREMOS ENTRADA
**/
archivo1 = new File ("C:/Users/GABY/Desktop/GananciasGas.txt");
fr1 = new FileReader (archivo1);
br1 = new BufferedReader(fr1);