Hi, good day every one. I really don't know how to deal with IOException.
public synchronized long[] findByCriteria(
String[] criteria) {
long[] result;
try{
dataFile.seek(getLocation(recNo));
... ...
return result;
} catch (IOException ioe) {
ioe.printStackTrace();
//If have exception return null;
return null;
}
//If have no result,return 0 length array
return new long[0];
}
how do you think?