com.github.mikesafonov.smpp.assertj.SubmitSmCharsetUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smpp-server-mock-assertj Show documentation
Show all versions of smpp-server-mock-assertj Show documentation
AssertJ asserts for smpp-server-mock
The newest version!
package com.github.mikesafonov.smpp.assertj;
import com.cloudhopper.commons.charset.Charset;
import com.cloudhopper.commons.charset.CharsetUtil;
import com.cloudhopper.smpp.pdu.SubmitSm;
import lombok.experimental.UtilityClass;
/**
* @author Mike Safonov
*/
@UtilityClass
class SubmitSmCharsetUtil {
static String toText(SubmitSm submitSm, Charset charset) {
byte[] bytes = submitSm.getShortMessage();
return CharsetUtil.decode(bytes, charset);
}
}