Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.FileInputStream;

import javax.swing.ProgressMonitorInputStream;

public class Main {

    public static void main(String args[]) throws Exception {
        ProgressMonitorInputStream monitor;

        monitor = new ProgressMonitorInputStream(null, "Loading ", new FileInputStream("fileName.txt"));

        while (monitor.available() > 0) {
            byte[] data = new byte[38];
            monitor.read(data);
            System.out.write(data);
        }
    }
}