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.IOException;
import java.io.InputStream;

public class Main {
    public static byte[] readBytes(InputStream is) throws IOException {
        byte[] buffer;

        buffer = new byte[is.available()];
        is.read(buffer);
        is.close();

        return buffer;
    }
}