public final byte [ ] getMessageContentAsByte ( ) throws StorageException { if ( Utility . isNullOrEmpty ( this . messageContent ) ) { return new byte [ 0 ] ; } if ( this . messageType == QueueMessageType . RAW_STRING ) { try { return this . messageContent . getBytes ( Constants . UTF8_CHARSET ) ; } catch ( final UnsupportedEncodingException e ) { throw Utility . generateNewUnexpectedStorageException ( e ) ; } } else { return Base64 . decode ( this . messageContent ) ; } }
Gets the content of the message as a byte array .