Java I/O, NIO and NIO.2 by Jeff Friesen PDF

By Jeff Friesen

ISBN-10: 1484215656

ISBN-13: 9781484215654

Java I/O, NIO, and NIO.2 is a power-packed publication that speeds up your mastery of Java's numerous I/O APIs. during this ebook, you'll find out about vintage I/O APIs (File, RandomAccessFile, the move periods and similar forms, and the reader/writer classes). subsequent, you'll know about NIO's buffer, channel, selector, normal expression, charset, and formatter APIs. ultimately, you'll notice NIO.2's choices by way of a more robust dossier procedure interface, asynchronous I/O, and the final touch of socket channel functionality.

After analyzing and utilizing thi publication, you'll achieve the speeded up wisdom and ability point to truly construct functions with effective info entry, in particular for today's cloud computing streaming information needs.

What you’ll learn
How to set permissions and extra with the vintage dossier class
How to construct a flat dossier database with RandomAccessFile
Get to grasp the byte array, dossier, clear out, and different kinds of streams
Master serialization and externalization
Discover personality streams and their linked writers/readers
Tour the buffer APIs
Work with channels to move buffers to and from I/O services
Find out approximately selectors and readiness selection
Master commonplace expressions
Discover charsets and their organization with Java's String< class
Take benefit of the formatter API to create formatted output
How to customise the formatter API
Explore the enhanced dossier process interface
Discover asynchronous I/O and its organization with futures and of completion handlers
Encounter socket channel advancements, together with multicasting
Who this publication is for
This ebook is for these skilled with Java, past the basics.

Show description

Read Online or Download Java I/O, NIO and NIO.2 PDF

Similar java books

Download e-book for iPad: Pro Spring 2.5 by Anirvan Chakraborty, Jessica Ditt, Aleksa Vukotic, Jan

The Spring Framework 2. five free up displays the cutting-edge in either the Spring Framework and firm Java frameworks as an entire. A guidebook to this severe software is important analyzing for any conscientious Java developer. — Rob Harrop, writer of professional Spring The stream from so–called heavyweight architectures, corresponding to company JavaBeans, towards light-weight frameworks, like Spring, has no longer stopped in view that professional Spring was once released by means of Rob Harrop and Jan Machacek in 2005; in truth, it’s picked up speed.

Read e-book online Pro Spring 2.5 (Books for Professionals by Professionals) PDF

The open resource agile light-weight Spring (meta) Framework 2. five is by way of a long way the best cutting edge strength and “lightning rod” that’s using today’s Java undefined. Spring has time and time back confirmed itself in real-world hugely scalable company settings equivalent to banks and different monetary associations.

Download e-book for kindle: Restlet in Action Developing RESTful web APIs in Java by Jerome Louvel

Restlet in motion will get you all started with the Restlet Framework and the remainder structure type. Youll create and set up functions in checklist time whereas studying to take advantage of well known RESTful internet APIs successfully. This booklet seems to be on the many features of net improvement, on either the server and buyer facet, in addition to cloud computing, cellular Android units, and Semantic internet functions.

Additional info for Java I/O, NIO and NIO.2

Sample text

Return true when successful; otherwise, return false. This method throws IllegalArgumentException when time is negative. All operating systems support file-modification times to the nearest second, but some provide more precision. The time value will be truncated to fit the supported precision. If the operation succeeds and no intervening operations on the file take place, the next call to lastModified() will return the (possibly truncated) time value passed to this method. Suppose you’re designing a text editor application that a user will use to open a text file and make changes to its content.

It throws IOException when an I/O error occurs. static File createTempFile(String prefix, String suffix) Create an empty file in the default temporary file directory using the given prefix and suffix to generate its name. This overloaded class method calls its three-parameter variant, passing prefix, suffix, and null to this other method, and returning the other method’s return value. static File createTempFile(String prefix, String suffix, File directory) Create an empty file in the specified directory using the given prefix and suffix to generate its name.

4 did not include this capability because it relies on variable argument lists, a language feature that did not debut until JDK 5. Formatter class with a wealth of formatting capabilities along with related types that support custom formatting, and added printf() (and related format()) methods to the PrintStream class. Chapter 11 explores Formatter and demonstrates printf(). 2 JSR 51 specifies that NIO would introduce an improved file system interface that overcomes various problems with the legacy File class.

Download PDF sample

Java I/O, NIO and NIO.2 by Jeff Friesen

by Kevin

Rated 4.30 of 5 – based on 16 votes