Java Byte Array Convert To bytesToStringAscii(byte[] bytes)

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

Description

bytes To String Ascii

License

Apache License

Declaration

public static String bytesToStringAscii(byte[] bytes) 

Method Source Code

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

public class Main {
    public static String bytesToStringAscii(byte[] bytes) {
        char[] buffer = new char[bytes.length];
        for (int i = 0; i < buffer.length; i++) {
            buffer[i] = (char) bytes[i];
        }//from  www  . j av  a 2s . c o  m
        return new String(buffer);
    }
}

Related

  1. bytesToNumber(byte[] buffer, int start, int length)
  2. bytesToPdu(byte[] bytes)
  3. bytesToSectors(long bytes)
  4. bytesToSignedInt(byte bb1, byte bb2)
  5. bytesToStore(int bits)
  6. bytesToStringMac(byte[] mac)
  7. bytesToStringUTFCustom(byte[] bytes)
  8. bytesToSVar64(final byte[] buffer, final int offset)
  9. bytesToTagBE(byte[] bytes, int off)