Java Byte Array to String bytes2String(byte[] buffer, int offset, int length)

Here you can find the source of bytes2String(byte[] buffer, int offset, int length)

Description

bytes String

License

Apache License

Declaration

public static String bytes2String(byte[] buffer, int offset, int length) 

Method Source Code

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

public class Main {
    public static String bytes2String(byte[] buffer, int offset, int length) {
        StringBuilder sb = new StringBuilder();

        for (int i = offset; i < offset + length; i++) {
            byte b = buffer[i];

            sb.append(String.format("%02X", b));
            sb.append(" ");
        }//from  www .  ja v  a2 s . co  m

        return sb.toString();
    }
}

Related

  1. bytes2str(byte[] arr)
  2. bytes2Str(byte[] bytes, String separator)
  3. bytes2String(byte[] args)
  4. bytes2String(byte[] b, int start, int len)
  5. bytes2String(byte[] bs, String charset)
  6. bytes2String(byte[] bytes)
  7. bytes2String(byte[] bytes)
  8. bytes2String(byte[] bytes)
  9. bytes2String(byte[] bytesArray)