Java Byte Array Print printBytes(byte[] buffer, int start, int length)

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

Description

print Bytes

License

Apache License

Declaration

public static String printBytes(byte[] buffer, int start, int length) 

Method Source Code

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

public class Main {
    public static String printBytes(byte[] buffer, int start, int length) {
        StringBuilder sb = new StringBuilder(length - start);
        for (int i = start; i < start + length; i++) {
            sb.append(String.format("%%%02x", buffer[i]));
        }/*from www . ja v a2s  .com*/
        return sb.toString();
    }
}

Related

  1. printByteArray(byte[] input)
  2. printByteArrayAsChars(byte[] bytes)
  3. printByteArrayToHex(byte[] byteArray, int length)
  4. printByteHexEncoded(byte b)
  5. printBytes(byte[] ba)
  6. printBytes(byte[] bytes)
  7. printBytes(byte[] bytes)
  8. printBytes(byte[] bytes)
  9. printBytes(byte[] bytes)