public WsByteBuffer[] getBuffers()
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getBuffers");

      final com.ibm.wsspi.bytebuffer.WsByteBuffer[] tcpBuffers = writeCtx.getBuffers();
      WsByteBuffer[] jfapByteBuffers = null;

      if(tcpBuffers != null) 
      {
        jfapByteBuffers = new WsByteBuffer[tcpBuffers.length];

        int nonNullCount = 0;

        for(com.ibm.wsspi.bytebuffer.WsByteBuffer buffer: tcpBuffers)
        {
           //Only wrap non-null buffers
           if(buffer != null)
           {
              jfapByteBuffers[nonNullCount++] = ((RichByteBufferPool) WsByteBufferPool.getInstance()).wrap(buffer);
           }
        }

        //tcpBuffers contained null entries, compact it
        if(nonNullCount < tcpBuffers.length)
        {
           final WsByteBuffer[] compactedArray = new WsByteBuffer[nonNullCount];
           System.arraycopy(jfapByteBuffers, 0, compactedArray, 0, nonNullCount);
           jfapByteBuffers = compactedArray;
        }
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getBuffers", Arrays.toString(jfapByteBuffers));
      return jfapByteBuffers;
   }
public WsByteBuffer [ ] getBuffers ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getBuffers" ) ; final com . ibm . wsspi . bytebuffer . WsByteBuffer [ ] tcpBuffers = writeCtx . getBuffers ( ) ; WsByteBuffer [ ] jfapByteBuffers = null ; if ( tcpBuffers != null ) { jfapByteBuffers = new WsByteBuffer [ tcpBuffers . length ] ; int nonNullCount = 0 ; for ( com . ibm . wsspi . bytebuffer . WsByteBuffer buffer : tcpBuffers ) { if ( buffer != null ) { jfapByteBuffers [ nonNullCount ++ ] = ( ( RichByteBufferPool ) WsByteBufferPool . getInstance ( ) ) . wrap ( buffer ) ; } } if ( nonNullCount < tcpBuffers . length ) { final WsByteBuffer [ ] compactedArray = new WsByteBuffer [ nonNullCount ] ; System . arraycopy ( jfapByteBuffers , 0 , compactedArray , 0 , nonNullCount ) ; jfapByteBuffers = compactedArray ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getBuffers" , Arrays . toString ( jfapByteBuffers ) ) ; return jfapByteBuffers ; }
@see com.ibm.ws.sib.jfapchannel.framework.IOWriteRequestContext#getBuffers()