NIO Buffer Introduction

1, using conventional IO streams byte [] byte array or char [] character array to operate the data stream, but the Java language operating API itself is very small array of array, the length property is only commonly used and subscript [x] .

 

2, NIO buffer using Buffer class to manipulate data stream, the method provides a lot of tools, greatly improving the efficiency of program development.

 

3, Buffer class is an abstract class , having seven direct subclasses , namely: ByteBuffer, CharBuffer, DoubleBuffer, FloatBuffer , IntBuffer, LongBuffer, ShortBuffer, these subclasses are abstract.

 

4, StringBuffer lang package is the following, non-nio classes, using the NIO CharBuffer to store characters. In NIO Buffer for storing basic data types (excluding boolean) container.

 

5, the buffer is not thread-safe of.

Guess you like

Origin www.cnblogs.com/xy80hou/p/11105914.html