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 {
    /**
     * <pre>
     * Print a very long {@link String} to logcat by splitting {@link String} object to smaller {@link String} of 4000 characters.
     * </pre>
     */
    public static void logLongString(final String tag, final String str) {
        if (str.length() > 4000) {
            Log.d(tag, str.substring(0, 4000));
            logLongString(tag, str.substring(4000));
        } else {
            Log.d(tag, str);
        }
    }
}