/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package controladora;
import entidade.*;
import java.io.*;
/**
*
* @author Andre
*/
public class AreaOverflow {
private File nomearquivo;
public AreaOverflow(){
}
public AreaOverflow(File nome){
nomearquivo=nome;
}
public void insereDados(String nome){
try{
FileWriter escrever = new FileWriter(nomearquivo,true);
BufferedWriter buffer = new BufferedWriter(escrever);
buffer.write(nome);
buffer.newLine();
buffer.flush();
}catch(IOException e){
e.printStackTrace();
}
}
public String lerDados(){
String linha = "";
try{
FileReader ler = new FileReader(nomearquivo);
BufferedReader buffer = new BufferedReader(ler);
while(buffer.ready()){
//JOptionPane.showMessageDialog(null, linha);
linha=linha + buffer.readLine() + "\n";
}
buffer.close();
}catch(IOException e){
e.printStackTrace();
}
return linha;
}
public void removeDados(int numero){
//tem q achar o dado e deletar
}
public void alteraDados(Dados dado){
}
public void buscaDados(Dados dado){
}
public void ordenaporNumero(){
String z = lerDados();
String[] x= z.split("-");
for ( int i =0; i<x.length; i++){
int auxiliar = 0;
if ( auxiliar < Integer.parseInt(x[i])){
auxiliar= Integer.parseInt(x[i]);
}
}
}
public boolean existeDado(int numero){
return true;
}
}
vlws