Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package runners.pkg16;
- import java.io.File;
- import java.io.FileNotFoundException;
- import java.util.Formatter;
- import java.util.Scanner;
- /**
- *
- * @author VitorPacheco
- */
- public class LogErros {
- static Formatter criarFicheiroLogErros (String nomeFile) throws FileNotFoundException{
- Formatter out = new Formatter(new File(nomeFile));
- return out;
- }
- public static void registoErro(String linha, String erro, Formatter LogErros){
- LogErros.format("%50s %40s\n", linha, erro);
- }
- static void fecharFicheiroLogErros (Formatter nomeFile) throws FileNotFoundException{
- nomeFile.close();
- }
- public static void lerInfoFicheiroLogErros(Scanner file){
- while (file.hasNext()){
- String linha = file.nextLine();
- System.out.printf("%s\n", linha);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement