public static String getBufferTraceInfo ( WsByteBuffer buffers [ ] ) { if ( null == buffers ) { return "Null buffer array" ; } StringBuilder sb = new StringBuilder ( 32 + ( 64 * buffers . length ) ) ; for ( int i = 0 ; i < buffers . length ; i ++ ) { sb . append ( "\r\n\t Buffer [" ) ; sb . append ( i ) ; sb . append ( "]: " ) ; getBufferTraceInfo ( sb , buffers [ i ] ) ; } return sb . toString ( ) ; }
This method is called for tracing in various places . It returns a string that represents all the buffers in the array including hashcode position limit and capacity .