[请教]read()的用法
private class OpenAction extends AbstractAction {public OpenAction(){
putValue( Action.NAME,"打开");
putValue( Action.SHORT_DESCRIPTION,"打开本地文件" );
putValue( Action.MNEMONIC_KEY, new Integer('o') );
}
public void actionPerformed( ActionEvent event ) {
int i = new JFileChooser().showOpenDialog(MDIWebBrowser.this);
if(i==JFileChooser.APPROVE_OPTION){
File f = new JFileChooser().getSelectedFile();
try{
InputStream is=new FileInputStream(f);
new WebBrowserPane().read(is,"");
}catch(Exception ex){
ex.printStackTrace();
}
}
}
}
这是打开一个文件的事件 请教这段代码中read()的用法