Here you can find the source of decimalDump(final byte[] bytes)
Parameter | Description |
---|---|
bytes | a parameter |
public static String decimalDump(final byte[] bytes)
//package com.java2s; //License from project: Apache License public class Main { private static final int SINGLE_BYTE_SIGN_MASK = 0xFF; /**// w ww .j a va 2s . c o m * Dumps the byte array into a string as a series of 8bit decimal numbers * * @param bytes * @return */ public static String decimalDump(final byte[] bytes) { StringBuffer buffer = new StringBuffer(); for (byte b : bytes) { buffer.append(Byte.toString((byte) (b & SINGLE_BYTE_SIGN_MASK))); buffer.append(" "); } return buffer.toString(); } }