Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.io.IOException;
import java.io.InputStream;

public class Main {
    public static String getInputStreamString(InputStream is) throws IOException {
        byte[] buffer = new byte[is.available()];
        int len = is.read(buffer);
        return new String(buffer, 0, len, "utf-8");
    }
}