Lines Matching defs:bytes
369 private static String dumpBinaryDataAsString(String indent, byte[] bytes)
377 for (int i = 0; i < bytes.length; i += SAMPLE_SIZE)
379 if (bytes.length - i > SAMPLE_SIZE)
382 buf.append(Strings.fromByteArray(Hex.encode(bytes, i, SAMPLE_SIZE)));
384 buf.append(calculateAscString(bytes, i, SAMPLE_SIZE));
390 buf.append(Strings.fromByteArray(Hex.encode(bytes, i, bytes.length - i)));
391 for (int j = bytes.length - i; j != SAMPLE_SIZE; j++)
396 buf.append(calculateAscString(bytes, i, bytes.length - i));
404 private static String calculateAscString(byte[] bytes, int off, int len)
410 if (bytes[i] >= ' ' && bytes[i] <= '~')
412 buf.append((char)bytes[i]);