DicomInputStream dis = null;
DicomObject dio = null;
try{
dis = new DicomInputStream(f);
dio = dis.readDicomObject();//这里抛出异常
java.io.EOFException
at org.dcm4che2.io.DicomInputStream.readFully(DicomInputStream.java:351)
at org.dcm4che2.io.DicomInputStream.readBytes(DicomInputStream.java:654)
at org.dcm4che2.io.DicomInputStream.readValue(DicomInputStream.java:590)
at org.dcm4che2.io.DicomInputStream.parse(DicomInputStream.java:518)
at org.dcm4che2.io.DicomInputStream.readItems(DicomInputStream.java:606)
at org.dcm4che2.io.DicomInputStream.readValue(DicomInputStream.java:588)
at org.dcm4che2.io.DicomInputStream.parse(DicomInputStream.java:518)
at org.dcm4che2.io.DicomInputStream.readDicomObject(DicomInputStream.java:415)
at org.dcm4che2.io.DicomInputStream.readItemValue(DicomInputStream.java:637)
at org.dcm4che2.io.DicomInputStream.readValue(DicomInputStream.java:566)
at org.dcm4che2.io.DicomInputStream.parse(DicomInputStream.java:518)
at org.dcm4che2.io.DicomInputStream.readItems(DicomInputStream.java:606)
at org.dcm4che2.io.DicomInputStream.readValue(DicomInputStream.java:588)
at org.dcm4che2.io.DicomInputStream.parse(DicomInputStream.java:518)
at org.dcm4che2.io.DicomInputStream.readDicomObject(DicomInputStream.java:415)
at org.dcm4che2.io.DicomInputStream.readDicomObject(DicomInputStream.java:423)
at com.shenzhou.feiyun.protocol.dicom.DicomReveiver.receiveData(DicomReveiver.java:88)
at com.shenzhou.feiyun.integration.framework.TemplateIntegrator.transferOne2One(TemplateIntegrator.java:73)
at com.shenzhou.feiyun.integration.framework.TemplateIntegrator.transfer(TemplateIntegrator.java:106)
at com.shenzhou.feiyun.integration.framework.TemplateIntegrator.doJob(TemplateIntegrator.java:96)
at com.shenzhou.feiyun.integration.framework.TaskRunner.runWork(TaskRunner.java:63)
at com.shenzhou.feiyun.integration.framework.TaskRunner.access$000(TaskRunner.java:16)
at com.shenzhou.feiyun.integration.framework.TaskRunner$1.run(TaskRunner.java:45)
at java.lang.Thread.run(Thread.java:748)
setStreamPosition(0L)
能解释的详细点?
@w的世界: 没用过这个,但既然你流都已经到eof了,那么把流再设到头上看下
EOFException表示输入过程中意外地到达文件尾或流尾的信号,导致从session中获取数据失败。异常是tomcat本身的问题,由于tomcat上次非正常关闭时有一些活动session被持久化(表现为一些临时文件),在重启时,tomcat尝试去恢复这些session的持久化数据但又读取失败造成的。此异常不影响系统的使用。
是一个纯java的项目,没有用tomcate
有心想赚你这100分。但是找不到 org.dcm4che2.io.DicomInputStream 这个包。。。呵呵,你能把这个maven的坐标发给我吗?
我用的是本地包,我也没找到maven的坐标