currently getting this error message:
Error in com/codegym/task/task09/task0929/Solution.java on line 38
cannot find symbol
symbol: variable fileInputStream
location: class com.codegym.task.task09.task0929.Solution
package com.codegym.task.task09.task0929;
import java.io.*;
/*
Let's make the code do something useful!
*/
public class Solution
{
public static void main(String[] args) throws IOException
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String sourceFileName = reader.readLine ( );
String destinationFileName = reader.readLine();
int counter = 0;
while (counter < 2)
{
try
{
InputStream fileInputStream = getInputStream ( sourceFileName );
counter = 3;
}
catch (IOException e)
{
System.out.println ( "File does not exist." );
counter++;
sourceFileName = reader.readLine ( );
}
}
OutputStream fileOutputStream = getOutputStream(destinationFileName);
while (fileInputStream.available() > 0)
{
int data = fileInputStream.read();
fileOutputStream.write(data);
}
fileInputStream.close();
fileOutputStream.close();
}
public static InputStream getInputStream(String fileName) throws IOException
{
return new FileInputStream(fileName);
}
public static OutputStream getOutputStream(String fileName) throws IOException
{
return new FileOutputStream(fileName);
}
}