早教吧作业答案频道 -->其他-->
java.io.EOFExceptionatjava.io.RandomAccessFile.readChar(RandomAccessFile.java:746)java.io.EOFExceptionatjava.io.RandomAccessFile.readChar(RandomAccessFile.java:746)atFixedLengthStringIO.readFixedLengthString(FixedLengthStringIO.java:13)atAddress
题目详情
java.io.EOFException at java.io.RandomAccessFile.readChar(RandomAccessFile.java:746)
java.io.EOFException
at java.io.RandomAccessFile.readChar(RandomAccessFile.java:746)
at FixedLengthStringIO.readFixedLengthString(FixedLengthStringIO.java:13)
at AddressBook$7$1.actionPerformed(AddressBook.java:204)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:682)
at java.awt.EventQueue$3.run(EventQueue.java:680)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:696)
at java.awt.EventQueue$4.run(EventQueue.java:694)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
什么错误来的
java.io.EOFException
at java.io.RandomAccessFile.readChar(RandomAccessFile.java:746)
at FixedLengthStringIO.readFixedLengthString(FixedLengthStringIO.java:13)
at AddressBook$7$1.actionPerformed(AddressBook.java:204)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:682)
at java.awt.EventQueue$3.run(EventQueue.java:680)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:696)
at java.awt.EventQueue$4.run(EventQueue.java:694)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
什么错误来的
▼优质解答
答案和解析
异常的意思是到达了文件的末尾.
就是你到了文件末尾,你仍然要读文件.
你贴下代码,你读文件的代码有问题.没有判断是否达到文件末尾,
就是你到了文件末尾,你仍然要读文件.
你贴下代码,你读文件的代码有问题.没有判断是否达到文件末尾,
看了 java.io.EOFExc...的网友还看了以下:
java题java中的接口问题在线等java中1已知类B实现了接口A,设有以下声明Aa;Bb;则以 2020-05-17 …
java.io.EOFExceptionatjava.io.RandomAccessFile.re 2020-05-17 …
在java中,下面选项中关于java.lang.Object类的说法错误的是()在java中,下面 2020-05-24 …
java 画矩形package testFrame;import java.awt.Color;i 2020-06-27 …
关于javaI\O的问题20.()对于文件的描述,以下哪些是正确的?A.Java中对于文本文件和二 2020-07-17 …
.一个java问题希望详细解答下关于下面程序片段,(B)的结论是正确的。Stringa="Java 2020-07-17 …
在JAVA中,下面两题的运算的结果是什么?为什么。1:x+a%3*(int)(x+y)%2/4,在 2020-07-17 …
在java中如果同一个包中父类在a.java中,子类在b.java中,编译时已成功编译父类,为何子 2020-07-17 …
用Java做的定义一个时间类型(类名MyTime)定义名为Mytime类,其中应有三个整形用Jav 2020-07-17 …
Java练习题寻求帮助1.面向对象编程的三要素是()、()和()。2.Java语言的数据类型整型分四 2020-11-01 …