Tuesday, February 2, 2016

[Java] NIO Non-blocking I/O

IO vs NIO :

1 NIO is buffer oriented : when get a value from stream, the value will be stored in a buffer
   IO is streamoriented : get value directly from stream, no buffer

2 IO is blocking : when a thread call read or write, the thread is blocked.
   NIO is not blocking

3 NIO has Selectors allows user to trait several channels in mono-thread


      3 work stats of NIO : channels and Buffer, asynchronous IO , Selectors

to be continue....

No comments:

Post a Comment