/*
* 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.
*/
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
/**
*
* @author maryu
*/
public class TesteLeituraEscrita {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
//Fluxo de entrada de arqivo
InputStream fis = System.in;
Reader isr = new InputStreamReader(fis);
BufferedReader br = new BufferedReader(isr);
//Fluxo de saída do arquivo
OutputStream fos = new FileOutputStream("texto3.txt");
Writer osw = new OutputStreamWriter(fos);
BufferedWriter bw = new BufferedWriter(osw);
String linha = br.readLine();
while (linha != null && linha.isEmpty()) {
bw.write(linha);
bw.newLine();
linha = br.readLine();
}
br.close();
bw.close();
}
}