Help with a java.io.IOException
/*
input : MemoryAccess - to load process into the disk
output : true if file opened, flase if fails
purpose : to open a file and read in the processes
code sourse: http://javaalmanac.com/egs/java.io/ReadLinesFromFile.html
*/
public boolean openFile(MemoryAccess ma)
{
Process p;
String file, inputString;
char name = ' ';
int mem = 0, quantum = 0, numProc;
char[] charArray;
//Ask user for file name
System.out.print("Enter file name:");
BufferedReader stdin = new BufferedReader(new InputStreamReader( System.in ));
file = stdin.readLine();
//We are writing this code under the assumption that the memory column(in small.dat) is formated to 2 spa\
ces
//and all other columns are one space.
try {
BufferedReader in = new BufferedReader(new FileReader(file));
numProc = new Integer(in.readLine()).intValue();
while ((inputString = in.readLine()) != null)
{
charArray = inputString.toCharArray();
name = charArray[0];
if((charArray[2] != ' ') && (charArray[3] != ' '))
{
mem = ((int)(charArray[2] * 10) + (int)charArray[3]);
}
else if(charArray[2] != ' ')
{
mem = charArray[2];
}
else
{
mem = charArray[3];
}
quantum = (int)charArray[5];
}
System.out.print(name + " ");
System.out.print(mem + " ");
System.out.println(quantum);
in.close();
return true;
} catch (IOException e)
{
return false;
}
}
Pwnix.java:67: unreported exception java.io.IOException; must be caught or declared to be thrown
file = stdin.readLine();
^
1 error
That is my code and my error, I can't figure out what's wrong.

