Java UTF8 Convert To fromUTF8(byte[] b)

Here you can find the source of fromUTF8(byte[] b)

Description

from UTF

License

Open Source License

Declaration

protected static String fromUTF8(byte[] b) 

Method Source Code


//package com.java2s;
import java.io.UnsupportedEncodingException;

public class Main {
    protected static String fromUTF8(byte[] b) {
        try {/*from  w ww . j  a  va  2  s.c o m*/
            return new String(b, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new IllegalStateException("can't happen");
        }
    }
}

Related

  1. fromUTF8(byte[] bytes)
  2. fromUTF8(byte[] bytes)
  3. fromUTF8(byte[] bytes)
  4. fromUTF8Bytes(byte[] bytes)