Skip to content

Commit 44ed751

Browse files
committed
java I/O ppt(initial)
1 parent e92a639 commit 44ed751

File tree

2 files changed

+318
-6
lines changed

2 files changed

+318
-6
lines changed

guide/io.lyx

Lines changed: 95 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,31 @@ C的IO回顾
164164
\end_layout
165165

166166
\begin_layout Itemize
167-
输入输出的“源”都被看做设备,使用设备描述符来区分不同的输入输出源。
167+
输入输出的“源”都被看做设备,使用设备描述符
168+
\begin_inset Index idx
169+
status open
170+
171+
\begin_layout Plain Layout
172+
设备描述符
173+
\end_layout
174+
175+
\end_inset
176+
177+
来区分不同的输入输出源。
168178
\end_layout
169179

170180
\begin_layout Itemize
171-
从设备输入或者输出的数据通过“流”(stream)模型来处理,参见
181+
从设备输入或者输出的数据通过“流”(stream
182+
\begin_inset Index idx
183+
status open
184+
185+
\begin_layout Plain Layout
186+
stream
187+
\end_layout
188+
189+
\end_inset
190+
191+
)模型来处理,参见
172192
\begin_inset ERT
173193
status open
174194

@@ -209,6 +229,16 @@ reference "fig:C的输出模型"
209229
\end_inset
210230

211231
232+
\begin_inset Note Note
233+
status open
234+
235+
\begin_layout Plain Layout
236+
把下图的输入流和输出流画成管道的形状
237+
\end_layout
238+
239+
\end_inset
240+
241+
212242
\end_layout
213243

214244
\begin_layout Standard
@@ -386,9 +416,28 @@ Java的IO体系
386416

387417
\begin_layout Standard
388418
Java继承了C对输入输出的基本认识:无论输入输出来自何处(设备),去往何处(设备),一律当做“流”的方式来处理。流就像一个仅容一个bit数据通过的管道一样,是
389-
一个有序的数据序列。如果我们按照8位(1个字节)来分割解读流中的数据序列,就是“面向字节的流”,有时也简称“字节流”;如果我们以16位(2个字节,即1个字符)来
390-
分割和解读流中的数据,就是“面向字符的流”,有时也简称“字符流”。其实,字节流和字符流的区分并没有改变流的数据本质,只是我们以不同的视角解读数据罢了,就像一部红
391-
楼,经学家看见《易》,道学家看见淫,才子看见缠绵,革命家看见排满,流言家看见宫闱秘事
419+
一个有序的数据序列。如果我们按照8位(1个字节)来分割解读流中的数据序列,就是“面向字节的流”,有时也简称“字节流
420+
\begin_inset Index idx
421+
status open
422+
423+
\begin_layout Plain Layout
424+
字节流
425+
\end_layout
426+
427+
\end_inset
428+
429+
”;如果我们以16位(2个字节,即1个字符)来分割和解读流中的数据,就是“面向字符的流”,有时也简称“字符流
430+
\begin_inset Index idx
431+
status open
432+
433+
\begin_layout Plain Layout
434+
字符流
435+
\end_layout
436+
437+
\end_inset
438+
439+
”。其实,字节流和字符流的区分并没有改变流的数据本质,只是我们以不同的视角解读数据罢了,就像一部红楼,经学家看见《易》,道学家看见淫,才子看见缠绵,革命家看见排
440+
满,流言家看见宫闱秘事
392441
\begin_inset Foot
393442
status open
394443

@@ -1398,7 +1447,47 @@ ASCII文件可以安全的使用面向字节的流读写,因为ASCII字符的
13981447
\end_layout
13991448

14001449
\begin_layout Standard
1401-
我们之前一直在使用的System.in,实际上一个InputStream类型的对象,Sytsem.out实际上是一个PrintStream类型的对象
1450+
我们之前一直在使用的System.in
1451+
\begin_inset Index idx
1452+
status open
1453+
1454+
\begin_layout Plain Layout
1455+
System.in
1456+
\end_layout
1457+
1458+
\end_inset
1459+
1460+
,实际上一个InputStream
1461+
\begin_inset Index idx
1462+
status open
1463+
1464+
\begin_layout Plain Layout
1465+
InputStream
1466+
\end_layout
1467+
1468+
\end_inset
1469+
1470+
类型的对象,Sytsem.out
1471+
\begin_inset Index idx
1472+
status open
1473+
1474+
\begin_layout Plain Layout
1475+
Sytsem.out
1476+
\end_layout
1477+
1478+
\end_inset
1479+
1480+
实际上是一个PrintStream
1481+
\begin_inset Index idx
1482+
status open
1483+
1484+
\begin_layout Plain Layout
1485+
PrintStream
1486+
\end_layout
1487+
1488+
\end_inset
1489+
1490+
类型的对象
14021491
\begin_inset Foot
14031492
status open
14041493

guide/ppt/io.lyx

Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
#LyX 2.3 created this file. For more info see http://www.lyx.org/
2+
\lyxformat 544
3+
\begin_document
4+
\begin_header
5+
\save_transient_properties true
6+
\origin unavailable
7+
\textclass beamer-chinese
8+
\begin_preamble
9+
% see http://deic.uab.es/~iblanes/beamer_gallery/ for how
10+
% to choose theme and color
11+
\usetheme{Warsaw}
12+
% or AnnArbor, Antibes,Bergen, Berkeley, Berlin, Boadilla,
13+
%CambridgeUS, Copenhagen, Darmstadt, default, Dresden,
14+
%Frankfurt, Goettingen, Hannover, Ilmenau, JuanLesPins,
15+
%Luebeck, Madrid, Malmoe, Marburg, Montpellier, PaloAlto,
16+
%Pittsburgh, Rochester, Singapore, Szeged, Stockton,
17+
%boxes, Warsaw…
18+
19+
%\usecolortheme{whale}
20+
%or albatross, orchid, beaver, rose, beetle, seagull, crane.
21+
%seahorse, default, sidebartab, dolphin , structure
22+
%dove, whale, fly, wolverine, lily
23+
\setbeamercovered{dynamic}
24+
\usepackage[os=win]{menukeys}
25+
\end_preamble
26+
\use_default_options true
27+
\begin_modules
28+
logicalmkup
29+
multicol
30+
coderemarks
31+
\end_modules
32+
\maintain_unincluded_children false
33+
\language chinese-simplified
34+
\language_package default
35+
\inputencoding utf8-plain
36+
\fontencoding global
37+
\font_roman "default" "文泉驿点阵正黑"
38+
\font_sans "default" "文泉驿微米黑"
39+
\font_typewriter "default" "文泉驿等宽正黑"
40+
\font_math "auto" "auto"
41+
\font_default_family default
42+
\use_non_tex_fonts true
43+
\font_sc false
44+
\font_osf false
45+
\font_sf_scale 100 100
46+
\font_tt_scale 100 100
47+
\use_microtype false
48+
\use_dash_ligatures true
49+
\graphics default
50+
\default_output_format pdf4
51+
\output_sync 0
52+
\bibtex_command default
53+
\index_command default
54+
\float_placement tbph
55+
\paperfontsize default
56+
\spacing single
57+
\use_hyperref true
58+
\pdf_bookmarks true
59+
\pdf_bookmarksnumbered false
60+
\pdf_bookmarksopen false
61+
\pdf_bookmarksopenlevel 3
62+
\pdf_breaklinks true
63+
\pdf_pdfborder true
64+
\pdf_colorlinks true
65+
\pdf_backref false
66+
\pdf_pdfusetitle true
67+
\papersize default
68+
\use_geometry true
69+
\use_package amsmath 1
70+
\use_package amssymb 1
71+
\use_package cancel 1
72+
\use_package esint 1
73+
\use_package mathdots 1
74+
\use_package mathtools 1
75+
\use_package mhchem 1
76+
\use_package stackrel 1
77+
\use_package stmaryrd 1
78+
\use_package undertilde 1
79+
\cite_engine basic
80+
\cite_engine_type default
81+
\biblio_style plain
82+
\use_bibtopic false
83+
\use_indices false
84+
\paperorientation portrait
85+
\suppress_date false
86+
\justification true
87+
\use_refstyle 1
88+
\use_minted 0
89+
\boxbgcolor #dad3d7
90+
\index Index
91+
\shortcut idx
92+
\color #008000
93+
\end_index
94+
\secnumdepth 3
95+
\tocdepth 1
96+
\paragraph_separation indent
97+
\paragraph_indentation default
98+
\is_math_indent 0
99+
\math_numbering_side default
100+
\quotes_style english
101+
\dynamic_quotes 0
102+
\papercolumns 1
103+
\papersides 1
104+
\paperpagestyle default
105+
\tracking_changes false
106+
\output_changes false
107+
\html_math_output 0
108+
\html_css_as_file 0
109+
\html_be_strict false
110+
\end_header
111+
112+
\begin_body
113+
114+
\begin_layout Title
115+
Java I/O
116+
\end_layout
117+
118+
\begin_layout Author
119+
宿宝臣 <subaochen@126.com>
120+
\end_layout
121+
122+
\begin_layout Institute
123+
山东理工大学
124+
\end_layout
125+
126+
\begin_layout Frame
127+
\begin_inset Argument 4
128+
status open
129+
130+
\begin_layout Plain Layout
131+
概述
132+
\end_layout
133+
134+
\end_inset
135+
136+
137+
\end_layout
138+
139+
\begin_layout Frame
140+
\begin_inset CommandInset toc
141+
LatexCommand tableofcontents
142+
143+
\end_inset
144+
145+
146+
\end_layout
147+
148+
\begin_layout Section
149+
设备和流
150+
\end_layout
151+
152+
\begin_layout Standard
153+
\begin_inset Separator plain
154+
\end_inset
155+
156+
157+
\end_layout
158+
159+
\begin_layout Frame
160+
\begin_inset Argument 4
161+
status open
162+
163+
\begin_layout Plain Layout
164+
C的I/O回顾
165+
\end_layout
166+
167+
\end_inset
168+
169+
170+
\end_layout
171+
172+
\begin_deeper
173+
\begin_layout Itemize
174+
输入流
175+
\end_layout
176+
177+
\begin_layout Itemize
178+
输出流
179+
\end_layout
180+
181+
\end_deeper
182+
\begin_layout Standard
183+
\begin_inset Separator plain
184+
\end_inset
185+
186+
187+
\end_layout
188+
189+
\begin_layout Frame
190+
\begin_inset Argument 4
191+
status open
192+
193+
\begin_layout Plain Layout
194+
面向字符的流
195+
\end_layout
196+
197+
\end_inset
198+
199+
200+
\end_layout
201+
202+
\begin_layout Standard
203+
\begin_inset Separator plain
204+
\end_inset
205+
206+
207+
\end_layout
208+
209+
\begin_layout Frame
210+
\begin_inset Argument 4
211+
status open
212+
213+
\begin_layout Plain Layout
214+
面向字节的流
215+
\end_layout
216+
217+
\end_inset
218+
219+
220+
\end_layout
221+
222+
\end_body
223+
\end_document

0 commit comments

Comments
 (0)