Tải bản đầy đủ (.pdf) (2,891 trang)

Java I/O, 2nd Edition pot

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (7.53 MB, 2,891 trang )

Java™ I/O, 2nd Edition
Table of Contents
Copyright
Preface
Part PART I: Basic I/O
Chapter 1. Introducing I/O
Section 1.1. What Is a Stream?
Section 1.2. Numeric Data
Section 1.3. Character Data
Section 1.4. Readers and
Writers
Section 1.5. Buffers and


Channels
Section 1.6. The Ubiquitous
IOException
Section 1.7. The Console:
System.out, System.in, and
System.err
Section 1.8. Security Checks on
I/O
Chapter 2. Output Streams
Section 2.1. Writing Bytes to
Output Streams
Section 2.2. Writing Arrays of

Bytes
Section 2.3. Closing Output
Streams
Section 2.4. Flushing Output
Streams
Section 2.5. Subclassing
OutputStream
Section 2.6. A Graphical User
Interface for Output Streams
Chapter 3. Input Streams
Section 3.1. The read( )
Method

Section 3.2. Reading Chunks of
Data from a Stream
Section 3.3. Counting the
Available Bytes
Section 3.4. Skipping Bytes
Section 3.5. Closing Input
Streams
Section 3.6. Marking and
Resetting
Section 3.7. Subclassing
InputStream
Section 3.8. An Efficient

Stream Copier
Part PART II: Data Sources
Chapter 4. File Streams
Section 4.1. Reading Files
Section 4.2. Writing Files
Section 4.3. File Viewer, Part 1
Chapter 5. Network Streams
Section 5.1. URLs
Section 5.2. URL Connections
Section 5.3. Sockets
Section 5.4. Server Sockets
Section 5.5. URLViewer

Part PART III: Filter Streams
Chapter 6. Filter Streams
Section 6.1. The Filter Stream
Classes
Section 6.2. The Filter Stream
Subclasses
Section 6.3. Buffered Streams
Section 6.4.
PushbackInputStream
Section 6.5.
ProgressMonitorInputStream
Section 6.6. Multitarget Output

Streams
Section 6.7. File Viewer, Part 2
Chapter 7. Print Streams
Section 7.1. Print Versus Write
Section 7.2. Line Breaks
Section 7.3. Error Handling
Section 7.4. printf( )
Section 7.5. Formatter
Section 7.6. Formattable
Chapter 8. Data Streams
Section 8.1. The Data Stream
Classes

Section 8.2. Integers
Section 8.3. Floating-Point
Numbers
Section 8.4. Booleans
Section 8.5. Byte Arrays
Section 8.6. Strings and chars
Section 8.7. Little-Endian
Numbers
Section 8.8. Thread Safety
Section 8.9. File Viewer, Part 3
Chapter 9. Streams in Memory
Section 9.1. Sequence Input

Streams
Section 9.2. Byte Array
Streams
Section 9.3. Communicating
Between Threads Using Piped
Streams
Chapter 10. Compressing
Streams
Section 10.1. Inflaters and
Deflaters
Section 10.2. Compressing and
Decompressing Streams

Section 10.3. Zip Files
Section 10.4. Checksums
Section 10.5. File Viewer, Part
4
Chapter 11. JAR Archives
Section 11.1. Meta-Information:
Manifest Files and Signatures
Section 11.2. The jar Tool
Section 11.3. The java.util.jar
Package
Section 11.4. JarFile
Section 11.5. JarEntry

Section 11.6. Attributes
Section 11.7. Manifest
Section 11.8. JarInputStream
Section 11.9. JarOutputStream
Section 11.10.
JarURLConnection
Section 11.11. Pack200
Section 11.12. Reading
Resources from JAR Files
Chapter 12. Cryptographic
Streams
Section 12.1. Hash Functions

Section 12.2. The
MessageDigest Class
Section 12.3. Digest Streams
Section 12.4. Encryption Basics
Section 12.5. The Cipher Class
Section 12.6. Cipher Streams
Section 12.7. File Viewer, Part
5
Chapter 13. Object Serialization
Section 13.1. Reading and
Writing Objects
Section 13.2. Object Streams

Section 13.3. How Object
Serialization Works
Section 13.4. Performance
Section 13.5. The Serializable
Interface
Section 13.6. Versioning
Section 13.7. Customizing the
Serialization Format
Section 13.8. Resolving Classes
Section 13.9. Resolving Objects
Section 13.10. Validation
Section 13.11. Sealed Objects

Section 13.12. JavaDoc
Part PART IV: New I/O
Chapter 14. Buffers
Section 14.1. Copying Files
with Buffers
Section 14.2. Creating Buffers
Section 14.3. Buffer Layout
Section 14.4. Bulk Put and Get
Section 14.5. Absolute Put and
Get
Section 14.6. Mark and Reset
Section 14.7. Compaction

Section 14.8. Duplication
Section 14.9. Slicing
Section 14.10. Typed Data
Section 14.11. Read-Only
Buffers
Section 14.12. CharBuffers
Section 14.13. Memory-
Mapped I/O
Chapter 15. Channels
Section 15.1. The Channel
Interfaces
Section 15.2. File Channels

Section 15.3. Converting
Between Streams and Channels
Section 15.4. Socket Channels
Section 15.5. Server Socket
Channels
Section 15.6. Datagram
Channels
Chapter 16. Nonblocking I/O
Section 16.1. Nonblocking I/O
Section 16.2. Selectable
Channels
Section 16.3. Selectors

Section 16.4. Selection Keys
Section 16.5. Pipe Channels
Part PART V: The File System
Chapter 17. Working with Files
Section 17.1. Understanding
Files
Section 17.2. Directories and
Paths
Section 17.3. The File Class
Section 17.4. Filename Filters
Section 17.5. File Filters
Section 17.6. File Descriptors

Section 17.7. Random-Access
Files
Section 17.8. General
Techniques for Cross-Platform
File Access Code
Chapter 18. File Dialogs and
Choosers
Section 18.1. File Dialogs
Section 18.2. JFileChooser
Section 18.3. File Viewer, Part
6
Part PART VI: Text

Chapter 19. Character Sets and
Unicode
Section 19.1. The Unicode
Character Set
Section 19.2. UTF-16
Section 19.3. UTF-8
Section 19.4. Other Encodings
Section 19.5. Converting
Between Byte Arrays and
Strings
Chapter 20. Readers and
Writers

Section 20.1. The java.io.Writer
Class
Section 20.2. The
OutputStreamWriter Class
Section 20.3. The
java.io.Reader Class
Section 20.4. The
InputStreamReader Class
Section 20.5. Encoding
Heuristics
Section 20.6. Character Array
Readers and Writers

Section 20.7. String Readers
and Writers
Section 20.8. Reading and
Writing Files
Section 20.9. Buffered Readers
and Writers
Section 20.10. Print Writers
Section 20.11. Piped Readers
and Writers
Section 20.12. Filtered Readers
and Writers
Section 20.13. File Viewer Finis

Chapter 21. Formatted I/O with
java.text
Section 21.1. The Old Way
Section 21.2. Choosing a
Locale
Section 21.3. Number Formats
Section 21.4. Specifying Width
with FieldPosition
Section 21.5. Parsing Input
Section 21.6. Decimal Formats
Part PART VII: Devices
Chapter 22. The Java

Communications API
Section 22.1. The Architecture
of the Java Communications
API
Section 22.2. Identifying Ports
Section 22.3. Communicating
with a Device on a Port
Section 22.4. Serial Ports
Section 22.5. Parallel Ports
Chapter 23. USB
Section 23.1. USB Architecture
Section 23.2. Finding Devices

Section 23.3. Controlling
Devices
Section 23.4. Describing
Devices
Section 23.5. Pipes
Section 23.6. IRPs
Section 23.7. Temperature
Sensor Example
Section 23.8. Hot Plugging
Chapter 24. The J2ME Generic
Connection Framework
Section 24.1. The Generic

Connection Framework
Section 24.2.
ContentConnection
Section 24.3. Files
Section 24.4. HTTP
Section 24.5. Serial I/O
Section 24.6. Sockets
Section 24.7. Server Sockets
Section 24.8. Datagrams
Chapter 25. Bluetooth
Section 25.1. The Bluetooth
Protocol

Section 25.2. The Java
Bluetooth API
Section 25.3. The Local Device
Section 25.4. Discovering
Devices
Section 25.5. Remote Devices
Section 25.6. Service Records
Section 25.7. Talking to
Devices
Part PART VIII: Appendix
Character Sets
About the Author

Colophon
Colophon
Index
A
B
C
D
E
F
G
H
I

J
K
L
M
N
O
P
R
S
T
U

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×