 
	
		
			
		
	
[此贴子已经被作者于2006-12-4 18:24:06编辑过]
 
	
		
			
		
	
[此贴子已经被作者于2006-12-4 18:24:06编辑过]
我试了还是不行,只能读一半
麻烦高手再给指点一下,谢谢了
我的程序如下:
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
public class TestInput3 {
    private void input() throws IOException{
        StringBuilder sb=new StringBuilder();
        RandomAccessFile ra=new RandomAccessFile(new File("d:/zz.dbf"),"r"); 
        for(int i=0;i<ra.length();i++){
        ra.seek(i);
        sb.append((char)ra.readByte());
        }
        System.out.println(sb.toString());
    }
    public static void main(String[] args) throws IOException{
        TestInput3 t=new TestInput3();
        t.input();
    }
}
其中那个“zz.dbf"在一楼帖子的附件里(不过要把格式攺成.dbf)
只能读一半!