Ver Mensaje Individual
  #5 (permalink)  
Antiguo 24/10/2013, 20:17
andre___5025
 
Fecha de Ingreso: septiembre-2013
Ubicación: Bogota
Mensajes: 139
Antigüedad: 10 años, 7 meses
Puntos: 0
Respuesta: Convertir datos(String) de archivo de texto a enteros

esta bien:

Cita:
package pruebas;

import java.io.*;
public class Pruebas {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {

File f = new File( "C:/Users/Nando Cruz/Desktop/Sin ordenar/Sinordenar_10k_1D.txt" );
BufferedReader entrada;
try {
entrada = new BufferedReader( new FileReader( f ) );
String linea;
while(entrada.ready()){
linea = entrada.readLine();
Integer.parseInt(linea);
System.out.println(linea);
}
}catch (IOException e) {
e.printStackTrace();
}
}
}
Y el error que me sale es:

Exception in thread "main" java.lang.NumberFormatException: For input string: "| 0 || 1 |"
at java.lang.NumberFormatException.forInputString(Num berFormatException.java:65)