public static String showBufferContents ( WsByteBuffer buffers [ ] ) { if ( null == buffers || 0 == buffers . length ) { return "null" ; } StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < buffers . length ; i ++ ) { sb . append ( "Buffer [" ) ; sb . append ( i ) ; if ( null == buffers [ i ] ) { sb . append ( "]: null\r\n" ) ; } else { sb . append ( "]: " ) ; sb . append ( WsByteBufferUtils . asString ( buffers [ i ] ) ) ; sb . append ( "\r\n" ) ; } } return sb . toString ( ) ; }
Return a String containing all the data in the buffers provided between their respective positions and limits .