J2ME FileConnection的问题?
用FileConnection读本地文件,返回值总是为-1,试过很多类型的文件,且以确认文件路径正确,文件存在,代码如下:
FileConnection fc = (FileConnection)Connector.open("file://localhost/root1/SuperDAT.log");
//FileConnection fc = (FileConnection) Connector.open("file://localhost/E:/SuperDAT.log", Connector.READ_WRITE);
long len = fc.availableSize();
long len1 = fc.totalSize();
long len2 = fc.fileSize();
long len3 = fc.usedSize();
System.out.println("len="+len+" "+len1+" "+len2+" "+len3+" ");
哪位高手指教下啊?