disable System out print write - Java 2D Graphics

Java examples for 2D Graphics:Print

Description

disable System out print write

Demo Code


//package com.java2s;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;

public class Main {
    public static void disablewrite() {

        System.setOut(new PrintStream(new OutputStream() {
            @Override/*from  w  w  w.j  a v a2s. c o m*/
            public void write(int b) throws IOException {
            }
        }));
    }
}

Related Tutorials