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 final boolean DEBUG = true;
    private static final int LOG_SIZE_LIMIT = 3500;
    public static final String LOG_TAG = "Digital_Medical";

    public static void LOG_D(Class<?> paramClass, String paramString) {
        if (DEBUG) {
            String str = paramClass.getName();
            if (str != null) {
                str = str.substring(1 + str.lastIndexOf("."));
            }
            int i = paramString.length();
            if (i > LOG_SIZE_LIMIT) {
                int j = 0;
                int k = 1 + i / LOG_SIZE_LIMIT;
                while (j < k + -1) {
                    Log.d(LOG_TAG, paramString.substring(j * LOG_SIZE_LIMIT, LOG_SIZE_LIMIT * (j + 1)));
                    j++;
                }
                Log.d(LOG_TAG, paramString.substring(j * LOG_SIZE_LIMIT, i));
            } else {
                Log.d(LOG_TAG, str + " -> " + paramString);
            }
        }

    }
}