没有合适的资源?快使用搜索试试~ 我知道了~
首页java Streams and Serialization 详解
java Streams and Serialization 详解

详细讲解了java各种输入输出流(stream),以及serialization和externalization的用法与关系
资源详情
资源评论
资源推荐

Streams and Serialization Streams and Serialization
Streams and Serialization Streams and Serialization
Unit 12

Unit ObjectivesUnit Objectives
•Look at streams and Java's stream classes
•Examine the use of streams
•Understand Java’s “new” I/O paradigm (blocks)
•Understand the role of serialization
•Look at streams and Java's stream classes
•Examine the use of streams
•Understand Java’s “new” I/O paradigm (blocks)
•Understand the role of serialization

StreamsStreams
•Streams allow data to be written to or read from an external
source
•There are two main types of streams:
–Byte streams
(8-bit) operate on bytes and byte arrays
•InputStream / OutputStream classes and subclasses
–Character streams (16-bit unicode) operate on characters,
character arrays and strings
•Reader / Writer classes and subclasses
•Streams allow data to be written to or read from an external
source
•There are two main types of streams:
–Byte streams (8-bit) operate on bytes and byte arrays
•InputStream / OutputStream classes and subclasses
–Character streams
(16-bit unicode) operate on characters,
character arrays and strings
•Reader / Writer classes and subclasses
program
source/
target
reads/
writes

OperationsOperations
•Sequential operations on streams usually follow the same
pattern, irrespective of:
–Data source
–Data type
–Data destination
stream.open()
while (more information) {
read/write information
}
stream.close()
stream.open()
while (more information) {
read/write information
}
stream.close()

Class Hierarchy: Character Stream InputClass Hierarchy: Character Stream Input
Reader
BufferedReader
CharArrayReader
FilterReader
LineNumberReader
PushbackReader
Reader
InputStreamReader
PipedReader
StringReader
FileReader
剩余35页未读,继续阅读














安全验证
文档复制为VIP权益,开通VIP直接复制

评论2