Skip to main content

Selectors

  • Chapter
Java I/O, NIO and NIO.2
  • 2297 Accesses

Abstract

I/O is either block-oriented (such as file I/O) or stream-oriented (such as network I/O). Streams are often slower than block devices (such as fixed disks) and read/write operations often cause the calling thread to block until input is available or output has been fully written. To compensate, modern operating systems let streams operate in, which makes it possible for a thread to read or write data without blocking. The operation fully succeeds or indicates partial success. Either way, the thread is able to perform other useful work instead of waiting.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Electronic Supplementary Material

Below is the link to the electronic supplementary material.

ch08 (zip 2 kb)

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Jeff Friesen

About this chapter

Cite this chapter

Friesen, J. (2015). Selectors. In: Java I/O, NIO and NIO.2. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1565-4_8

Download citation

Publish with us

Policies and ethics