public static final int lengthOf(WsByteBuffer[] list) {
        if (null == list) {
            return 0;
        }
        int length = 0;
        for (int i = 0; i < list.length && null != list[i]; i++) {
            length += list[i].remaining();
        }
        return length;
    }
public static final int lengthOf ( WsByteBuffer [ ] list ) { if ( null == list ) { return 0 ; } int length = 0 ; for ( int i = 0 ; i < list . length && null != list [ i ] ; i ++ ) { length += list [ i ] . remaining ( ) ; } return length ; }
Calculate the total length of actual content in the buffers in the input
list. This will stop on the first null buffer or the end of the list.

@param list
@return int