protected String getPayload ( Message message ) { try { String encoding = ( String ) message . get ( Message . ENCODING ) ; if ( encoding == null ) { encoding = "UTF-8" ; } CachedOutputStream cos = message . getContent ( CachedOutputStream . class ) ; if ( cos == null ) { LOG . warning ( "Could not find CachedOutputStream in message." + " Continuing without message content" ) ; return "" ; } return new String ( cos . getBytes ( ) , encoding ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } }
Gets the message payload .