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

正文內(nèi)容

輸入輸出流(帶倉庫系統(tǒng)作業(yè))(完整版)

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

下一頁面
  

【正文】 sHid = () ? Yes : No。 ? Java 的 I/O 流庫提供大量的流類 (在包) , 其中,所有輸入流類都是InputStream( 抽象類)或抽象類 Reader的子類,而所有輸出流類都是OutputStream( 抽象類)或抽象類Writer的子類 3 (File 類 ) ? File 類不允許訪問文件的內(nèi)容 ,沒有可用于訪問文件的 read() 和 write()方法 . ? File 類主要用于命名文件 ,查詢文件屬性和處理目錄 . 4 . 創(chuàng)建文件對(duì)象 構(gòu)造方法 : 1. public File(String s)。 String canRead = () ? Yes : No。 ? 由 InputStream 派生的類 ?構(gòu)造方法: FileInputStream(String name)。 9 處理 I/O 異常 ?必須使用 catch 塊檢測(cè)并處理 I/O 異常(IOException ), 如: try { FileInputStream ins= new FileInputStream (“)。 try { File f=new File(E:\\lanhong\\, )。 ?由 OutputStream 派生的類 14 打開 FileOutputStream ? 和 打 開 輸 入 流 FileInputStream類似 : FileOutput Stream myFileStream。 try { (輸入一行文本,并存入磁盤 : )。 FileWriter(String filename)。 Button button。 } catch(FileNotFoundException e) {} catch(IOException e) {} button=new Button(讀取 )。}} )。 如: BufferedWriter out= BufferedWriter(new FileReader(“”))。 text=new TextArea(10,10)。 setVisible(true)。 ()。 TextArea text。 menubar1=new MenuBar()。(menu1)。 ( new WindowAdapter() {public void windowClosing(WindowEvent e){ (false)。 File file=new File((),())。 }catch(IOException exp) {} 27 }else if(()==item2) { (true)。 ()。 //a 確定文件指針距離文件開頭的字節(jié)位置。 i)//一個(gè)int 型數(shù)據(jù)占 4個(gè)字節(jié),我們從 { (i*4)。 PipedOutputStream() out = new PipedOutputStream()。 (in)。 try { out=new PipedOutputStream()。 PipedInputStream in。 byte a[]=new byte[3]。 } int c=a[0]+a[1]+a[2]。 ObjectInputStream object_in=new ObjectInputStream(file_in)。 ObjectOutputStream object_out=null。add(text)。 object_out=new ObjectOutputStream(file_out)。 ()。 try { PrintStream ps=new PrintStream(new FileOutputStream())。 ?構(gòu)造方法: PrintWriter(OutputStream osteam)。 }catch (IOException e) {} 45 菜單項(xiàng) (保留原有的 ) 倉庫管理小程序 貨品編號(hào): 貨品名稱: 單 價(jià): 數(shù) 量: 金 額: 錄 入 查 詢 46 演講完畢,謝謝觀看! 。 (12345)。(how are you)。 ()。 ()。add(writer)。 text=new TextArea(6,10)。 ObjectOutputStream object_out=new ObjectOutputStream(file_out)。 }catch (IOException e) {} }} 38 8. 數(shù)據(jù)流 ?數(shù)據(jù)流允許程序按與機(jī)器無關(guān)的風(fēng)格讀取 Java 原始數(shù)據(jù)。 out=b。 thread1(PipedOutputStream a, PipedInputStream b) { try { out=a。 (out)。 //創(chuàng)建一個(gè)管道輸出流,它被連接到由參數(shù) a指定的管道輸入流。 ? PipedInputStream(PipedOutputStream a)。} //每隔 4個(gè)字節(jié)往前讀取一個(gè)整數(shù) 31 7. 管道流 ?管道是不同 線程 之間直接傳輸數(shù)據(jù)的基本手段。 30 P271, 例 9 in_and_out=new RandomAccessFile(“”, “rw”)。 ? RandomAccessFile 類既不是輸入流類 InputStream類的子類 , 也不是輸出流類 OutputStream類的子類。 File file=new File((),())。 in=new BufferedReader(file_reader)。 addWindowListener( new WindowAdapter() {public void windowClosin
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1