我遇到了问题,我的代码告诉我:
Exception caused by java.io.EOFException
这个错误是什么意思?我想导入一个对象 如果一个人输入了错误的名字,那么必须重复它而不是 表示此错误
代码
public List<order> importorders(String dataName)
List<order> orders;
FileInputStream fileInputStream = null;
try {
fileInputStream = new FileInputStream(dataName);
} catch (FileNotFoundException e) {
throw new RuntimeException("Can Not find " + dataName + "' not read!", e);
}
ObjectInputStream objectInputStream = null;
try {
objectInputStream = new ObjectInputStream(fileInputStream);
} catch (IOException e) {
throw new RuntimeException("Can Not Create ObjectInputStream", e);
}