hello
hello everyone, I am new to Java and to this community.
Could somebody take me through reading from input streams? I think I've started to lose the plot but...
I so far have things that look similar to this:
"BufferedReader empReader = null;
try
{
FileInputStream empStream = new FileInputStream ("employee.dat");
InputStreamReader inemp = new InputStreamReader(empStream);
BufferedReader empReader = new BufferedReader (inemp);
}
catch (FileNotFoundException e)
{
System.out.println ("Could not open employee.dat");
}
catch (SecurityException e2)
{
System.out.println ("You can't read employee.dat");
}
try
{
String line = empReader.readLine();
}
catch (IOException)
{
System.out.println ("sorry, IO exception");
}
"
Could somebody take me through reading from input streams? I think I've started to lose the plot but...
I so far have things that look similar to this:
"BufferedReader empReader = null;
try
{
FileInputStream empStream = new FileInputStream ("employee.dat");
InputStreamReader inemp = new InputStreamReader(empStream);
BufferedReader empReader = new BufferedReader (inemp);
}
catch (FileNotFoundException e)
{
System.out.println ("Could not open employee.dat");
}
catch (SecurityException e2)
{
System.out.println ("You can't read employee.dat");
}
try
{
String line = empReader.readLine();
}
catch (IOException)
{
System.out.println ("sorry, IO exception");
}
"
