public synchronized WsByteBuffer [ ] getBuffersForTransmission ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getBufferForTransmission" ) ; // Ensure the buffer has been prepared checkNotValid ( ) ; WsByteBuffer [ ] bufferArray = new WsByteBuffer [ dataList . size ( ) ] ; for ( int x = 0 ; x < dataList . size ( ) ; x ++ ) { bufferArray [ x ] = dataList . get ( x ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getBufferForTransmission" , dataList ) ; return bufferArray ; }
This method is called just before this buffer is due to be transmitted by the JFap channel . When calling this method the underlying byte buffer is prepared by setting the correct limits and the buffer is added to a List that is returned . Once this method is called the buffer may not be used again and any attempt to modify the data will cause a RuntimeException to be thrown . This method can only be called once .