1234567891011121314151617181920212223242526272829303132333435363738 |
- /*
- * 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 cache;
- import java.io.FileNotFoundException;
- import java.io.FileReader;
- import java.util.Scanner;
- /**
- *
- * @author Juninho Carlos
- */
- public class Arquivo {
- private Scanner in;
- String s;
-
- public Arquivo(String path) throws FileNotFoundException {
- in = new Scanner(new FileReader(path));
- }
-
- public boolean lerArquivo(){
- return this.in.hasNextLine();
- }
-
- public Requisicao getRequisicao(){
- this.s = in.nextLine();
- boolean read = s.contains("r");
- String teste = s.substring(1);
- Long add = new Long(teste);
- return new Requisicao(add, read);
- }
-
-
- }
|