Java NIO Tutorial

Source: Internet
Author: User


Java Nio  

1 Java NIO Tutorial
2 Java NIO Overview
3 Java NIO Channel
4 Java NIO Buffer
5 Java NIO Scatter/gather
6 Java NIO Channel to channel transfers
7 Java NIO Selector
8 Java NIO FileChannel
9 Java NIO Socketchannel
10 Java NIO Serversocketchannel
11 Java NIO Datagramchannel
12 Java NIO Pipe
13 Java NIO vs. IO

Java NIO Tutorial
by Jakob JenkovConnect with me:
Rate article: Share Article:tweet

Java NIO (New io) is a alternative IO API for Java (from Java 1.4), meaning alternative to the standard Java IO Andjava N Etworking API ' s. Java NIO offers a different of working with IO than the standard IO API ' s.

Java Nio:channels and buffers

The standard IO API is the streams and character streams with byte. In NIO channels and buffers. Data is all read from a channel into a buffer, or written from a buffer to a channel.

Java nio:non-blocking IO

Java NIO enables do non-blocking IO. For instance, a thread can ask a channel to read data into a buffer. While the channel reads data to the buffer, the thread can do something else. Once data is read to the buffer, the thread can then continue processing it. The same is true for writing data to channels.

Java nio:selectors

Java NIO contains the concept of "selectors". A Selector is an object that can monitor multiple channels for events (Like:connection opened, data arrived etc). Thus, a single thread can monitor multiple channels for data.

How all this works was explained in more detail with the next text in this series-the Java NIO Overview.



Next: Java NIO Overview




Java NIO Tutorial

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.