Java Byte Array to String by Charset newString(final byte[] bytes, final Charset charset)

Here you can find the source of newString(final byte[] bytes, final Charset charset)

Description

new String

License

Apache License

Declaration

private static String newString(final byte[] bytes, final Charset charset) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.nio.charset.Charset;

public class Main {
    private static String newString(final byte[] bytes, final Charset charset) {
        return bytes == null ? null : new String(bytes, charset);
    }//from   w  w  w.j a  v a  2  s.c o  m
}

Related

  1. identify(byte[] bytes, CharsetDecoder decoder)
  2. inflate(byte[] bytes, Charset encoding)
  3. isCharset(byte[] b, String inCharset)
  4. newString(byte[] bytes, Charset charset)
  5. newString(byte[] bytes, String charsetName)
  6. newString(final byte[] bytes, final Charset charset)
  7. newStringFromSplit(CharsetDecoder decoder, CharsetDecoder utf8Decoder, String encoding, byte[] fieldBytes, int length)
  8. parseBytes(byte[] encoded, Charset charset)
  9. str(byte[] bytes, String charset)