This code retrieves an instance from the pool, avoiding the memory allocation, construction, and eventual garbage collection.
代码从池中检索到一个实例,从而避免了内存分配、构建和最终的垃圾回收。
Any stream with an internal buffer should override this method and provide a much more efficient version that writes to the buffer directly, avoiding the extra array allocation on every call.
所有具有内部缓冲区的流都应重写此方法,提供一个直接写入缓冲区的有效得多的版本,以避免每次调用时都要进行额外的数组分配。
应用推荐