Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.util.Log;

public class Main {
    public static String printByteArrayAsInt(String caller, byte[] data) {
        String ret = "";
        for (int i = 0; i < data.length; i++) {
            ret += Integer.toHexString((int) (data[i] & 0xFF)) + ",";
            Log.i(caller, "Byte " + i + " is " + Integer.toHexString((int) (data[i] & 0xFF)));
        }
        return ret;
    }
}