Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.PushbackInputStream;

public class Main {
    public static void main(String args[]) throws IOException {
        byte buf[] = "==  = ".getBytes();
        PushbackInputStream f = new PushbackInputStream(new ByteArrayInputStream(buf));
        int c;
        while ((c = f.read()) != -1) {
            switch (c) {
            case '=':
                c = f.read();
                if (c == '=')
                    System.out.print(".eq.");
                else {
                    System.out.print("=");
                    f.unread(c);
                }
                break;
            default:
                System.out.print((char) c);
                break;
            }
        }
    }
}