El archivo 'texto-copia.txt' no se me actualiza con el contenido ingresado por consola, queda vacío. No sé que estoy haciendo mal
package ar.com.java.io.test;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
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;
public class TestCopiarPegar {
public static void main(String[] args) throws IOException {
InputStream fileInputStream = System.in;
Reader inputStreamReader = new InputStreamReader(fileInputStream);
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
OutputStream fileOutputStream = new FileOutputStream("texto-copia.txt");
Writer outputStreamWriter = new OutputStreamWriter(fileOutputStream);
BufferedWriter bufferedWriter = new BufferedWriter(outputStreamWriter);
String linea;
while ((linea = bufferedReader.readLine()) != null) {
bufferedWriter.write(linea);
bufferedWriter.newLine();
}
bufferedWriter.close();
}
}