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

正文內(nèi)容

第6章數(shù)據(jù)流的運(yùn)用-預(yù)覽頁

2025-08-13 12:21 上一頁面

下一頁面
 

【正文】 FileInputStream(“”)。 ()。 FileInputStream fis=new FileInputStream(inFile)。n FileOutputStream out=new FileOutputStream(fp)。n (s)。 (bArray)。class IOTest{ public statics void main(String args[]) {try { byte bArray[]=new byte[128]。 try{ inChar=(char)()。 (“Enter a character:”)。 } }}5stream\ 輸入輸出方法import .*。 (“You entered:”)。n 現(xiàn)在為 :String s=new String(bArray,0)。n 對文件操作要定義文件流n FileInputStream類用來打開一個(gè)輸入文件n FileOutputStream類用來打開一個(gè)輸出文件11 File I/On 文件流的建立n FileInputStream in=new FileInputStream(fp)。 File outFile=new File(”)。 while((c=())!=1) (c)。}catch(IOException e) {(FileStreamsTest: +e)。n len=(bArray)。 try{ (true)。)。 (998877665544332211L)。try{ (\t +())。 (\t +())。}finally{()。 int charCount=0。n }21文件目錄zip文件 隨機(jī)存取文件n 類 RandomAccessFilen zip文件需要用隨機(jī)方法處理n 文件目錄給出個(gè)文件的入口 ,可以隨機(jī)讀取 .n 創(chuàng)建一個(gè)隨機(jī)文件n new RandomAccessFile(“”, “r”)。 try { RandomAccessFile randf=new RandomAccessFile(“”)。 for(int i=。 } ()。n public class file_sizen { public static void main(String args[])n { File files=new File(“.”)。i++)n { File current_file=new File(file_list[i])。 throws IOException InputStreamReader ir。 String s=()。 }}可以將字符串轉(zhuǎn)換成整數(shù)加以運(yùn)算12328 java 中的 unicoden 問題 :n 如果字符流不是來自本地 ,有可能編碼不一樣 ,直接讀取會讀出不正確字符n 處理方法 :n ir=new InputStreamReader(is,”8859_1”)。 BufferedReader reader=new String s。 }catch(IOException e) { } }}30 使用管道流n PipedInputStream和 PipedOutputStreamn 創(chuàng)建管道流 :n PipedInputStream pis=new PipedInputStream()。輸出流 輸入流31 使用管道流n 管道流一定是輸入輸出并用n 例 :將數(shù)據(jù)從輸出管道進(jìn) ,從輸入管道出n import .*。n (PipedInputStream)。n ((byte)())。import n public class GetStringn { public String getStringFromUrl(URL inURL)n { InputStream in。n return null。n }catch(IOEception ioe)n {  (“Socket error:”+ioe)。 DataInputStream in =new DataInputSream(inStream)。 } }catch(EOFException eof) { (readString)。 int y。n { =x。 int age。 =age。public class Objectser{public static void main(String args[]) Student stu=new Student(981036,“Li Ming”,16,“CSD”)。()。public class ObjectRecov{ public static void main(String args[]) { Student stu
點(diǎn)擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1