Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.io.BufferedReader;

public class Main {
    private static String bufferToString(BufferedReader br) throws Exception {
        StringBuffer sb = new StringBuffer();
        try {
            for (String s = null; (s = br.readLine()) != null;)
                sb.append(s + "\n");

        } catch (Exception e) {
            throw new Exception("Error reading the buffer: " + e.getMessage());
        }
        return sb.toString();
    }
}