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

正文內(nèi)容

io輸入輸出外文翻譯-資料下載頁(yè)

2025-05-12 18:37本頁(yè)面

【導(dǎo)讀】現(xiàn)有的大量不同方案已經(jīng)說(shuō)明了這一點(diǎn)。挑戰(zhàn)似乎來(lái)自于要涵蓋所有的可能。不僅存在各種用于通信的I/O源端和接收端,按字符、按行、按字等)。Java類(lèi)庫(kù)的設(shè)計(jì)者是通過(guò)創(chuàng)建大量的類(lèi)來(lái)解決這個(gè)難題的。一開(kāi)始,可能會(huì)對(duì)。設(shè)計(jì)的初衷是為了避免過(guò)多的類(lèi))。在中,添加了nio類(lèi)(對(duì)于“新I/O”這個(gè)稱(chēng)呼,從現(xiàn)在這個(gè)名。字我們?nèi)詫⒁萌舾赡辏┯糜诟倪M(jìn)性能及功能。因此,在充分理解javaI/O系。統(tǒng)以便正確地運(yùn)用之前,我們需要學(xué)習(xí)相當(dāng)數(shù)量的類(lèi)。出數(shù)據(jù)的數(shù)據(jù)源對(duì)象或者是有能力接收數(shù)據(jù)的接收端對(duì)象?!傲鳌逼帘瘟藢?shí)際的。通過(guò)繼承,任何自Inputstream或Reader衍生而來(lái)的。們存在是因?yàn)閯e的類(lèi)可以使用它們,以便提供更有用的接口。有必要按照這些類(lèi)的功能對(duì)它們進(jìn)行分類(lèi)。InputStream的作用是用來(lái)表示那些從不同數(shù)據(jù)源產(chǎn)生輸入的類(lèi)。修飾器模式規(guī)定所有封裝于初始對(duì)象內(nèi)部的對(duì)象具有相。設(shè)計(jì)Reader和Writer繼承層次結(jié)構(gòu)主要是為了國(guó)際化。承層次結(jié)構(gòu)僅支持8位字節(jié)流,并且不能很好地處理16位的Unicode字符。

  

【正文】 . The value of standard I/O is that programs can easily be chained together, and one program’s standard output can bee the standard input for another program. This is a powerful tool. Reading from standard input Following the standard I/O model, Java has , , and . Throughout this book, you’ve seen how to write to standard output using , which is already prewrapped as a PrintStream object. is likewise a PrintStream, but is a raw InputStream with no wrapping. This means that although you can use and right away, must be wrapped before you can read from it. You’ll typically read input a line at a time using readLine( ). To do this, wrap in a BufferedReader, which requires you to convert to a Reader using InputStreamReader. Redirecting The Java System class allows you to redirect the standard input, output, and error I/O streams using simple static method calls: setIn(InputStream) setOut(PrintStream) setErr(PrintStream) Redirecting output is especially useful if you suddenly start creating a large amount of output on your screen, and it’s scrolling past faster than you can read Redirecting input is valuable for a mandline program in which you want to test a particular userinput sequence repeatedly. 中原工學(xué)院信息商務(wù)學(xué)院畢業(yè)設(shè)計(jì)(論文)譯文專(zhuān)用紙 13 New I/O The Java new I/O library, introduced in JDK in the .* packages, has one goal: speed. In fact, the old I/O packages have been reimplemented using nio in order to take advantage of this speed increase, so you will benefit even if you don’t explicitly write code with nio. The speed increase occurs both in file I/O, which is explored here, and in work I/O, which is covered in Thinking in Enterprise Java. The speed es from using structures that are closer to the operating system’s way of performing I/O: channels and buffers. You could think of it as a coal mine。 the channel is the mine containing the seam of coal (the data), and the buffer is the cart that you send into the mine. The cart es back full of coal, and you get the coal from the cart. That is, you don’t interact directly with the channel。 you interact with the buffer and send the buffer into the channel. The channel either pulls data from the buffer, or puts data into the buffer. The only kind of buffer that municates directly with a channel is a ByteBuffer— that is, a buffer that holds raw bytes. If you look at the JDK documentation for , you’ll see that it’s fairly basic: You create one by telling it how much storage to allocate, and there are methods to put and get data, in either raw byte form or as primitive data types. But there’s no way to put or get an object, or even a String. It’s fairly lowlevel, precisely because this makes a more efficient mapping with most operating systems. Three of the classes in the old I/O have been modified so that they produce a FileChannel: FileInputStream, FileOutputStream, and, for both reading and writing, RandomAccessFile. Notice that these are the byte manipulation streams, in keeping with the lowlevel nature of nio. The Reader and Writer charactermode classes do not produce channels, but the class has utility methods to produce Readers and Writers from channels
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1