Java Byte Array to String asString(byte[] bytes)

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

Description

as String

License

Open Source License

Declaration

private static String asString(byte[] bytes) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static String asString(byte[] bytes) {
        if (bytes != null) {
            return new String(bytes);
        } else {//ww  w .ja va2 s . c o  m
            return "";
        }
    }
}

Related

  1. ASCIIByteArrayToString(byte[] data)
  2. asString(byte[] a, String separator)
  3. asString(byte[] array)
  4. asString(byte[] bs)
  5. asString(byte[] buf)
  6. asString(byte[] bytes)
  7. ByteArrayToString(byte[] byteArray)
  8. bytes2str(byte[] arr)
  9. bytes2Str(byte[] bytes, String separator)