Java I/O (第二版)

                                     Java I/O  

       Java I/O

Java™ I/O, 2nd Edition

By Elliotte Rusty Harold

...............................................

Publisher: O'Reilly

Pub Date: May 2006

Print ISBN-10: 0-596-52750-0

Print ISBN-13: 978-0-59-652750-1

Pages: 726

翻译:魏照哲

时间:2009年3月3日

                      前言

本书完全是本人利用业余时间翻译,希望给大家带来方便!完完全全是作者的意思,我没有加入自己的理解!

                      概述

Java中的所有输入输出设备都是基于流的,流提供了读取和写入不同类型数据的简单方法。Java提供了许多种流,每种流都有它自己的特点。总的来说,流可以分为四个大类:输入字节流、输出字节流、输入字符流、输出字符流。你可能已经非常熟悉基本的流对象,不过你是否知道,CipherInputStream为了读取加密的(encrypted)数据;你是否知道,ZipOutputStream自动压缩数据;你是否能合理的利用缓冲流(buffered stream)是你的程序效率提高。Java I/O第二版已经更新致JDK1.5,并且告诉你一切你曾经需要知道的流,还可能超出你的想象!

对任何输入输出的讨论不能不考虑对字符的处理:设置和格式化。Java支持unicode标准,Unicode提供了许多语言中字符的定义。所以,Java是第一种编程语言,让你能够通过IO操作基本所有现实世界中的语言。Java也提供了一套复杂的格式化方式模型。

本书的第二版告诉了你怎样格式化数字,使用不再ASCII范围内的字符集,并且开始写支持多种语言的软件。

本书包括的内容:

1所有的I/O类和相关的类

2对数字的格式化和对国际字符集的支持

Input/output (I/O) is not a sexy subject, but it’s an important part of non-trivial applications. This book introduces you to most of Java’s I/O capabilities as of Java 8 update 51. Chapter 1 presents a broad overview of I/O in terms of Java’s classic I/O, New I/O (NIO), and NIO.2 categories. You learn what each category offers in terms of its capabilities, and you also learn about concepts such as paths and Direct Memory Access. Chapters 2 through 5 cover classic I/O APIs. You learn about the File and RandomAccessFile classes along with streams (including object serialization and externalization) and writers/readers. Chapters 6 through 11 focus on NIO. You explore buffers, channels, selectors, regular expressions, charsets, and formatters. (Formatters were not introduced with the other NIO types in Java 1.4 because they depend on the variable arguments capability that was introduced in Java 5.) NIO is missing several features, which were subsequently provided by NIO.2. Chapters 12 through 14 cover NIO.2’s improved file system interface, asynchronous I/O, and the completion of socket channel functionality. Each chapter ends with assorted exercises that are designed to help you master its content. Along with long answers and true/false questions, you are often confronted with programming exercises. Appendix A provides the answers and solutions. Appendix B provides a tutorial on sockets and network interfaces. Although not directly related to classic I/O, NIO, and NIO.2, they leverage I/O capabilities and are mentioned elsewhere in this book.
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值