Typically, a sending protocol stack will have a daemon as its bottom element. This section briefly introduces them and describes their functionality. The classes PooledByteArrayInputStream , PooledByteArrayOutputStream , PooledObjectInputStream and PooledObjectOutputStream are extensions of standard Java stream classes. They are not instantiated using standard constructors, but rather by requesting them from a PooledByteArrayStreamSource or PooledObjectStreamSource . It is important to note that the serialization format used by the pooled object streams is not compatible with standard object streams.
Pooled threads are a mechanism which reduces the overhead incurred by the creation of threads.
A pool of threads is obtained by instantiating a ThreadPool object. A maximum number of threads, as well as the default priority for each thread, can be specified. The thread pool is then used by enqueuing Runnable tasks, which are executed on available threads in the pool in the order in which they are enqueued. Up to the specified maximum number of tasks can run concurrently. While pooled threads can greatly reduce overhead, the use of thread pools with a preset maximum number of threads can lead to deadlock if care is not taken in their use.