不管是否存在文件只要点登录就报EOF错误

解决方案 »

  1.   

                fos = new FileOutputStream(s);
                dos = new ObjectOutputStream(fos);
                fis = new FileInputStream(s);
                dis = new ObjectInputStream(fis);你这个四行的目的是什么呢?从一个文件建了output stream,又建了input stream,是想又读又写么?这个肯定会有问题的。你是不是想用管道?那应该用PipedInput/outpout