Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/* This code is part of Freenet. It is distributed under the GNU General
 * Public License, version 2 (or at your option any later version). See
 * http://www.gnu.org/ for further details of the GPL. */

import java.io.IOException;

import java.io.Writer;

public class Main {
    public final static void writeLine(Writer w, int deep, String line) throws IOException {
        if (deep >= 0)
            writeDeep(w, deep);
        w.write(line);
        w.write('\n');
    }

    public final static void writeDeep(Writer w, int deep) throws IOException {
        if (deep == 0)
            return;
        for (int i = 0; i < deep; i++) {
            w.write("\t");
        }
    }
}