code: public synchronized DataSlice getDataSlice()
     {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getDataSlice");
  
        DataSlice slice = null;
  
        // Get the slice length
        int sliceLength = getInt();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Slice length: " + sliceLength);
  
        // Now we can create a new DataSlice object from the bytes in the buffer
        if (receivedBuffer.hasArray())
        {
           if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Received buffer has a backing array");
  
           slice = new DataSlice(receivedBuffer.array(),
                                 receivedBuffer.position() + receivedBuffer.arrayOffset(),
                                 sliceLength);
  
           // Move the position to the end of the message so that any data after the message
           // can be got
           receivedBuffer.position(receivedBuffer.position() + sliceLength);
        }
        else
        {
           if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Received buffer does NOT have a backing array");
  
           byte[] sliceArray = get(sliceLength);
           slice = new DataSlice(sliceArray,
                                 0,
                                 sliceLength);
        }
  
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getDataSlice", slice);
        return slice;
     }
docs: Gets a data slice from the buffer. The returned slice will be backed by the original byte
  array (i.e. not copied) if the backing array maps to real (malloc'd) storage. Otherwise a
  copy is taken of the data before it is passed into MFP.
  
  @return Returns the data slice.
  @see #putDataSlice(DataSlice)