| | |
| | | * information: "Portions Copyright [year] [name of copyright owner]". |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | * Portions Copyright 2015-2016 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.util; |
| | |
| | | import java.io.IOException; |
| | | import java.io.PrintStream; |
| | | |
| | | /** |
| | | * Tool for suppressing and unsuppressing output to standard |
| | | * output streams. |
| | | */ |
| | | /** Tool for suppressing and unsuppressing output to standard output streams. */ |
| | | public class StandardOutputSuppressor { |
| | | |
| | | private static Token token; |
| | |
| | | return token != null; |
| | | } |
| | | |
| | | /** |
| | | * PrintWriter for suppressing stream. |
| | | */ |
| | | /** PrintWriter for suppressing stream. */ |
| | | private static class NullOutputStream extends OutputStream { |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void write(int b) throws IOException { |
| | | // do nothing; |
| | | } |