Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.InputStream;

public class Main {
    public static void main(String[] args) throws Exception {

        boolean bool = false;

        InputStream inStream = new FileInputStream("c:/test.txt");

        // input stream is converted to buffered input stream
        BufferedInputStream bis = new BufferedInputStream(inStream);

        // returns true if mark() and read() supports
        bool = bis.markSupported();
        System.out.println("Support for mark() and reset() : " + bool);

    }
}