Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static int lerInfoFicheiro(String nomeFich, String[][] socios, int nSocios) throws FileNotFoundException {
- Scanner fInput = new Scanner(new File(nomeFich));
- while (fInput.hasNext() && nSocios < MAX_SOCIOS) {
- String linha = fInput.nextLine();
- linha = linha.trim();
- if (linha.length() > 0) {
- if (validarCampos(linha)) {
- nSocios = guardarDadosSocio(linha, socios, nSocios);
- } else {
- LogErros.escreverLogErros(linha, LogErros.msgErroInsc, inputTempos);
- }
- }
- if ( nSocios == MAX_SOCIOS ){
- LogErros.escreverLogErros(linha, "A partir desta linha escedeu-se o limite de sócios.", inputSocio);
- }
- }
- fInput.close();
- return nSocios;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement