did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9781565924857

Java I/O

by ; ;
  • ISBN13:

    9781565924857

  • ISBN10:

    1565924851

  • Format: Paperback
  • Copyright: 1999-03-01
  • Publisher: Oreilly & Associates Inc
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $39.95

Summary

All of Java's Input/Output (I/O) facilities are based on streams, which provide simple ways to read & write data of different types. Java provides many kinds of streams, each with its own application. The universe of streams is divided into four categories: input streams & output streams, for reading & writing binary data; & readers & writers, for reading & writing textual (character) data. You're familiar with the basic kinds of streams - but did you know that there's a CryptInputStream for reading encrypted data? And a ZipOutputStream for automatically compressing data? Do you know how to use buffered streams effectively to make your I/O operations more efficient? Java I/O tells you all you need to know about streams - & probably more. A discussion of I/O wouldn't be complete without treatment of character sets & formatting. Java supports the UNICODE standard, which provides definitions for the character sets of most written languages. Consequently, Java is the first programming language that lets you do I/O in any language. It also provides a sophisticated model for formatting textual & numeric data. Java I/O shows you how to control number formatting, use characters aside from the standard ASCII character set, & get a head start on writing truly multilingual software. Covers Java 1.2.

Table of Contents

Preface xiii
I. BASIC I/O 1(44)
1. Introducing I/O
3(23)
What Is a Stream?
4(3)
Numeric Data
7(4)
Character Data
11(4)
Readers and Writers
15(2)
The Ubiquitous IO Exception
17(1)
The Console: System.Out, System.in, and System.err
18(6)
Security Checks on I/O
24(2)
2. Output Streams
26(9)
The OutputStream Class
26(1)
Writing Bytes to Output Streams
27(1)
Writing Arrays of Bytes
28(1)
Flushing and Closing Output Streams
29(2)
Subclassing OutputStream
31(1)
A Graphical User Interface for Output Streams
32(3)
3. Input Streams
35(10)
The InputStream Class
35(1)
The read() Method
35(2)
Reading Chunks of Data from a Stream
37(1)
Counting the Available Bytes
38(1)
Skipping Bytes
39(1)
Closing Input Streams
40(1)
Marking and Resetting
41(1)
Subclassing InputStream
41(2)
An Efficient Stream Copier
43(2)
II. DATA SOURCES 45(30)
4. File Streams
47(11)
Reading Files
47(3)
Writing Files
50(3)
File Viewer, Part 1
53(5)
5. Network Streams
58(17)
URLs
58(3)
URL Connections
61(4)
Sockets
65(4)
Server Sockets
69(3)
URLViewer
72(3)
III. FILTER STREAMS 75(190)
6. Filter Streams
77(25)
The Filter Stream Classes
77(6)
The Filter Stream Subclasses
83(1)
Buffered Streams
84(3)
PushbackInputStream
87(1)
Print Streams
88(2)
Multitarget Output Streams
90(4)
File Viewer, Part 2
94(8)
7. Data Streams
102(42)
The Data Stream Classes
102(3)
Reading and Writing Integers
105(6)
Reading and Writing Floating-Point Numbers
111(4)
Reading and Writing Booleans
115(1)
Reading Byte Arrays
115(1)
Reading and Writing Text
116(4)
Miscellaneous Methods
120(1)
Reading and Writing Little-Endian Numbers
121(14)
Thread Safety
135(1)
File Viewer, Part 3
136(8)
8. Streams in Memory
144(11)
Sequence Input Streams
144(2)
Byte Array Streams
146(3)
Communicating Between Threads with Piped Streams
149(6)
9. Compressing Streams
155(61)
Inflaters and Deflaters
155(15)
Compressing and Decompressing Streams
170(8)
Working with Zip Files
178(15)
Checksums
193(4)
JAR Files
197(15)
File Viewer, Part 4
212(4)
10. Cryptographic Streams
216(49)
Hash Function Basics
217(3)
The MessageDigest Class
220(8)
Digest Streams
228(7)
Encryption Basics
235(3)
The Cipher Class
238(16)
Cipher Streams
254(6)
File Viewer, Part 5
260(5)
IV. ADVANCED AND MISCELLANEOUS TOPICS 265(270)
11. Object Serialization
267(37)
Reading and Writing Objects
267(2)
Object Streams
269(1)
How Object Serialization Works
270(2)
Performance
272(1)
The Serializable Interface
273(7)
The ObjectInput and ObjectOutput Interfaces
280(2)
Versioning
282(3)
Customizing the Serialization Format
285(11)
Resolving Classes
296(1)
Resolving Objects
297(1)
Validation
297(3)
Sealed Objects
300(4)
12. Working with Files
304(46)
Understanding Files
305(8)
Directories and Paths
313(7)
The File Class
320(22)
Filename Filters
342(1)
File Filters
343(1)
File Descriptors
344(1)
Random-Access Files
345(3)
General Techniques for Cross-Platform File Access Code
348(2)
13. File Dialogs and Choosers
350(37)
File Dialogs
350(8)
JFileChooser
358(21)
File Viewer, Part 6
379(8)
14. Multilingual Character Sets and Unicode
387(27)
Unicode
388(1)
Displaying Unicode Text
389(8)
Unicode Escapes
397(1)
UTF-8
398(2)
The char Data Type
400(10)
Other Encodings
410(1)
Converting Between Byte Arrays and Strings
411(3)
15. Readers and Writers
414(42)
The java.io.Writer Class
415(1)
The OutputStream Writer Class
416(3)
The java.io.Reader Class
419(1)
The InputStreamReader Class
420(2)
Character Array Readers and Writers
422(3)
String Readers and Writers
425(3)
Reading and Writing Files
428(2)
Buffered Readers and Writers
430(5)
Print Writers
435(2)
Piped Readers and Writers
437(2)
Filtered Readers and Writers
439(6)
File Viewer Finis
445(11)
16. Formatted I/O with java.text
456(44)
The Old Way
457(2)
Choosing a Locale
459(3)
Number Formats
462(9)
Specifying Width with FieldPosition
471(5)
Parsing Input
476(3)
Decimal Formats
479(14)
An Exponential Number Format
493(7)
17. The Java Communications API
500(35)
The Architecture of the Java Communications API
500(1)
Identifying Ports
501(9)
Communicating with a Device on a Port
510(7)
Serial Ports
517(11)
Parallel Ports
528(7)
V. APPENDIXES 535(20)
A. Additional Resources
537(7)
B. Character Sets
544(11)
Index 555

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program