private void readTree(){
final String f = //파일 경로
FileInputStream fisTree = null;
ObjectInputStream oisTree = null;
try {
fisTree
= new FileInputStream(f);
oisTree
= new ObjectInputStream(fisTree);
chosungTree = (Tree)oisTree.readObject();//이부분에서 에러가 납니다...
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (StreamCorruptedException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}finally{
if(fisTree != null)
try {
fisTree.close();
} catch (IOException e) {
e.printStackTrace();
}
if(oisTree != null)
try {
oisTree.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
chosungTree = (Tree)oisTree.readObject();//이부분에서 에러가 납니다...
저 object는 우분투에서 만들어서 파일만 메모리에 넣어준건데 그게 문제가 될까요?
같은 코드가 우분투에서는 잘돌아가는데 에러나니 참 답답하네요.
11-26 00:13:31.227: E/AndroidRuntime(22089): java.lang.StackOverflowError
이렇게 에러가 납니다.
조언 부탁드립니다. 감사합니다^^