freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

輸入輸出流(帶倉庫系統(tǒng)作業(yè))-文庫吧在線文庫

2025-03-21 06:54上一頁面

下一頁面
  

【正文】 m2)。}} )。 try{ //建立到文件 file的 FileReader 流,該文件通過 File 類和對話框來確定。 ()。 }catch(FileNotFoundException e1) {} catch(IOException e2) {} try {()。 ?RandomAccessFile類中的方法: seek(long a)。 i=0。 PipedInputStream() in = new PipedInputStream()。 PipedInputStream() in = new PipedInputStream()。 PipedInputStream in=null。 }} 36 class thread1 extends Thread{ PipedOutputStream out。 PipedInputStream in。 i++) { ( +a[i])。 ? ObjectInputStream類和 ObjectOutputStream 類創(chuàng)建的對象被稱為對象輸入流和對象輸出流 . ? 對象輸出流使用 writeObject(Object obj) 方法寫文件 . ? 對象輸入流使用 readObject() 方法讀文件 . 40 創(chuàng)建對象流的方法 ? ObjectInputStream/ DateOutputStream的指向是一個(gè)輸入 /輸出流對象,因而要首先用 FileInputStream/ FileOutputStream 創(chuàng)建一個(gè)文件流 . 如: FileInputStream file_in= new FileInputStream(“”)。 ObjectInputStream object_in=null。 setVisible(true)。 } 42 public void actionPerformed(ActionEvent e) { if(()==writer) { try { file_out=new FileOutputStream()。 (temp)。 ? 構(gòu)造方法: PrintStream(OutputStream osteam)。 }catch (IOException e) {} 44 11. PrintWriter 類 ?與 PrintStream 類類似。 ()。(how are you)。 (234)。 }catch(ClassNotFoundException e) { (“不能讀出對象 )。 }catch(IOException Event) {} }else if(()==reader) { try { file_in=new FileInputStream()。 addWindowListener( new WindowAdapter() {public void windowClosing(WindowEvent e) { (0)。 reader=new Button讀入對象 )。 41 P281, 例 14 public class Example20_14 extends Frame implements ActionListener { TextArea text=null。 ?構(gòu)造方法: DateInputStream(InputStream in)。 (out)。 in=b。 }catch (IOException e) {} thread1 one = new thread1(out,in)。 34 管道流的異常 ?創(chuàng)建管道流都必須捕獲 IOException 異常。 //創(chuàng)建一個(gè)管道輸入流,它被連接到由參數(shù) a指定的管道輸出流。 ? PipedInputStream類創(chuàng)建的對象稱為一個(gè)輸入管道, PipedOutputStream類創(chuàng)建的對象稱為一個(gè)輸出管道 。 try { for(int i=0。 ? RandomAccessFile類創(chuàng)建的流的指向既可以作為源,也可以作為目的地。 tofile=new FileWriter(file)。 while((s=())!=null) (s+39。(0)。 (false)。 item2=new MenuItem(保存文件 )。 BufferedWriter out。 }} 。 23 addWindowListener( new WindowAdapter() {public void windowClosing(WindowEvent e){ setVisible(false)。 out=new BufferedWriter(tofile)。 // 要寫入文件,必須執(zhí)行 22 P263, 例 5 Example20_5 TextArea text。 }catch(IOException exp) {} } } public class Example20_4 { public static void main(String args[]) { EWindow w=new EWindow()。 setSize(40,40)。 text=new TextArea(10,10)。 ?構(gòu)造方法是: BufferedReader(Reader in)。 (buffer,0,b)。 FileOutputSteam myFileStream。 try { String str=new String(buffer,0,b,Default)。 //len 指定該方法將讀取的最大字節(jié)數(shù)。 myFileStream = new FileInputStream (“)。 String i
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1