protected final String getMessageContentForTransfer(final boolean shouldEncodeMessage) throws StorageException {
        String result = null;
        if (this.messageType == QueueMessageType.RAW_STRING && shouldEncodeMessage) {
            result = Base64.encode(this.getMessageContentAsByte());
        }
        else {
            result = this.messageContent;
        }

        if (result != null && result.length() > QueueConstants.MAX_MESSAGE_SIZE) {
            throw new IllegalArgumentException(
                    String.format(SR.INVALID_MESSAGE_LENGTH, QueueConstants.MAX_MESSAGE_SIZE));
        }

        return result;
    }
protected final String getMessageContentForTransfer(final boolean shouldEncodeMessage) throws StorageException {
        String result = null;
        if (this.messageType == QueueMessageType.RAW_STRING && shouldEncodeMessage) {
            result = Base64.encode(this.getMessageContentAsByte());
        }
        else {
            result = this.messageContent;
        }

        if (result != null && result.length() > QueueConstants.MAX_MESSAGE_SIZE) {
            throw new IllegalArgumentException(
                    String.format(SR.INVALID_MESSAGE_LENGTH, QueueConstants.MAX_MESSAGE_SIZE));
        }

        return result;
    }
protected final String getMessageContentForTransfer ( final boolean shouldEncodeMessage ) throws StorageException { String result = null ; if ( this . messageType == QueueMessageType . RAW_STRING && shouldEncodeMessage ) { result = Base64 . encode ( this . getMessageContentAsByte ( ) ) ; } else { result = this . messageContent ; } if ( result != null && result . length ( ) > QueueConstants . MAX_MESSAGE_SIZE ) { throw new IllegalArgumentException ( String . format ( SR . INVALID_MESSAGE_LENGTH , QueueConstants . MAX_MESSAGE_SIZE ) ) ; } return result ; }
Gets the content of the message for transfer (internal use only).

@return A <code>String</code> which contains the content of the message.

@throws StorageException
If a storage service error occurred.
Gets the content of the message for transfer ( internal use only ) .