/** * Sets the allocator used by existing and new buffers */ public static void setAllocator(IoBufferAllocator newAllocator) { if (newAllocator == null) { throw new NullPointerException("allocator"); } IoBufferAllocator oldAllocator = allocator; allocator = newAllocator; if (null != oldAllocator) { oldAllocator.dispose(); } }
/** * Sets the allocator used by existing and new buffers * * @param newAllocator the new allocator to use */ public static void setAllocator(IoBufferAllocator newAllocator) { if (newAllocator == null) { throw new IllegalArgumentException("allocator"); } IoBufferAllocator oldAllocator = allocator; allocator = newAllocator; if (null != oldAllocator) { oldAllocator.dispose(); } }
/** * Sets the allocator used by existing and new buffers * * @param newAllocator the new allocator to use */ public static void setAllocator(IoBufferAllocator newAllocator) { if (newAllocator == null) { throw new IllegalArgumentException("allocator"); } IoBufferAllocator oldAllocator = allocator; allocator = newAllocator; if (null != oldAllocator) { oldAllocator.dispose(); } }