List of usage examples for org.apache.commons.lang3 StringUtils toString
@Deprecated public static String toString(final byte[] bytes, final String charsetName) throws UnsupportedEncodingException
byte[]
to a String using the specified character encoding. From source file:com.kolich.curacao.mappers.request.types.body.RequestBodyAsCharsetAwareStringMapper.java
@Override public final T resolveWithBody(final RequestBody annotation, final CuracaoContext context, final byte[] body) throws Exception { // Convert the byte[] array from the request body into a String // using the derived character encoding. final String encoding = getRequestEncoding(context); return resolveWithStringAndEncoding(annotation, // The encoding String itself. StringUtils.toString(body, encoding), // The encoding of the String. encoding);//from ww w . j av a 2 s.co m }