如题,需要在linux服务器上读取本地ftp服务器上的pdf文件,目的是需要校验pdf个文件的格式,大小等
我已经知道ftp服务器上的路径/var/……下面是部分代码
String temp=null;
PDDocument pdfdocument = null;
//在这里读不到ftp的文件
FileInputStream is=new FileInputStream(fileurl);///读不到
PDFParser parser = new PDFParser( is );
parser.parse();
pdfdocument= parser.getPDDocument();
    
COSDocument cd = pdfdocument.getDocument();
String version = cd.getHeaderString();
    
ByteArrayOutputStream out = new ByteArrayOutputStream();OutputStreamWriter writer = new OutputStreamWriter( out );
PDFTextStripper stripper = new PDFTextStripper();
stripper.writeText(pdfdocument.getDocument(), writer );
writer.close();
pdfdocument.close();报错(错误就出现在“FileInputStream is=new FileInputStream(fileurl);”这一行):
java.io.at java.io.FileInputStream.open(Native Method)fileurl:?
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at com.sinosoft.platform.handup.business.submitcapture.manager.CaptureManager.getPdfDesc(CaptureManager.java:1188)
        at com.sinosoft.platform.handup.business.submitcapture.manager.CaptureManager.judgePdfFile(CaptureManager.java:1157)
        at com.sinosoft.platform.handup.business.submitcapture.service.CaptureServiceImpl.checkUploadFile(CaptureServiceImpl.java:252)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
   ……
  请高手指教,急用