Java UTF8 fromUTF8(byte[] bytes)

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

Description

from UTF

License

Open Source License

Declaration

static String fromUTF8(byte[] bytes) 

Method Source Code


//package com.java2s;
/*//  w  ww  . j  a v  a 2s .c o  m
 * JBoss, Home of Professional Open Source.
 * Copyright 2014 Red Hat, Inc., and individual contributors
 * as indicated by the @author tags.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import java.nio.charset.Charset;

public class Main {
    private static Charset UTF8 = Charset.forName("UTF-8");

    static String fromUTF8(byte[] bytes) {
        return new String(bytes, UTF8);
    }
}

Related

  1. decodeUtf8(String url)
  2. decUTF8(String s)
  3. dumpStringArray(Path outputFilePath, String[] stringArray)
  4. dumpUtf8ToFile(List records, String delimiter, File file)
  5. fromUTF8(byte[] ba)
  6. fromUTF8(byte[] bytes)
  7. generateRawUTF8Bytes(final String string)
  8. getBytesUtf8(final String string)
  9. getFile(String outputFolder, String fileName)