books books

BOOKS

Since the late 1990s, I've authored and coauthored various books on Java. Also, I've created a series of Java project-oriented e-books. This page focuses on two books and this series.

Java I/O, NIO and NIO.2

Java I/O, NIO and NIO.2 is a power-packed and compact book that accelerates your mastery of Java's various I/O APIs. In this book, you'll learn about classic I/O APIs (File, RandomAccessFile, the stream classes and related types, and the reader/writer classes). Next, you'll learn about NIO's buffer, channel, selector, regular expression, charset, and formatter APIs. Finally, you'll discover NIO.2's offerings in terms of an improved file system interface, asynchronous I/O, and the completion of socket channel functionality.

This book's 500+ pages are mostly organized into 14 chapters and 2 appendices. The Table of Contents appears below:

I've discovered one mistake in this book. On Page 80, Listing 4-6 presents expression statement b[off + i] = (byte) map[off + i];. Replace map[off + i] with map[b[off + i] & 255]. The & 255 efficiently prevents sign extension so that a negative array index, which would result in an exception, is avoided.

Java I/O, NIO and NIO.2

Publisher: Apress
ISBN13: 978-1-484215-66-1

Visit one of the following Amazon stores to purchase this book:

Java Projects Workshop

Java Projects Workshop is a series of useful and/or entertaining Java projects that focus on helping the reader learn more about Java from a practical perspective. Each project consists of a professionally written PDF file that's bundled with code and (possibly) related assets into a Zip file for distribution. Instructors can use these projects to augment their teaching of Java language features and APIs.

Project distribution Zip files are hosted on Gumroad. Each project can be purchased in a safe and secure manner by clicking the project's purchase link in the relevant section below.

Analog Clock

A clock displays the current time in digital or analog format. Creating a Java application that functions as a digital clock is trivial: it's as simple as repeatedly executing System.out.println(new java.util.Date());. Creating a Java application that functions as an analog clock with animated hour, minute, and second hands is harder.

This project presents AnalogClock, a Swing-based application that achieves this analog clock. First, you explore its source code to learn how this application works. Then, you learn how to build and run AnalogClock on Windows and Linux platforms. Finally, you modify AnalogClock to use Java 8 lambdas and to present an AM/PM indicator label.

Java Projects Workshop: Analog Clock Java Projects Workshop: Analog Clock -- Page 7

Visit Gumroad's Java Projects Workshop: Analog Clock purchase page to check out additional project details and/or to purchase this project.

Comic Book Viewer

Comic books offer an inexpensive form of entertainment. Their popularity has led to many comic books being digitized. A digitized comic book consists of sequentially-numbered image files (typically in JPEG or PNG format) that are usually packaged into RAR-based CBR archives with .cbr file extensions and Zip-based CBZ archives with .cbz file extensions.

This project presents ComicBookViewer, a JavaFX-based application for viewing CBZ-only comic books. First, you explore its source code to learn how this application works. Then, you learn how to build and run ComicBookViewer on Windows and Linux platforms. Finally, you modify ComicBookViewer to support a file chooser for choosing other CBZ files to load.

Java Projects Workshop: Comic Book Viewer Java Projects Workshop: Comic Book Viewer -- Page 14

Visit Gumroad's Java Projects Workshop: Comic Book Viewer purchase page to check out additional project details and/or to purchase this project.

Java Threads and the Concurrency Utilities

Java Threads and the Concurrency Utilities is a power-packed and compact book that accelerates your mastery of Java's various thread-oriented APIs. In this book, you'll learn about the low-level Thread API capabilities, including the basics, synchronization, waiting and notification, and the additional capabilities of thread groups, thread local variables, and the Timer Framework. You'll then learn about the high-level concurrency utilities, executors, synchronizers, the Locking Framework, and the additional capabilities of concurrent collections, atomic variables, the Fork/Join Framework, and completion services.

This book's 200+ pages are mostly organized into 8 chapters and 2 appendices. The Table of Contents appears below:

Java Threads and the Concurrency Utilities

Publisher: Apress
ISBN13: 978-1-484216-99-6

Visit one of the following Amazon stores to purchase this book: