[ https://issues.apache.org/jira/browse/IO-608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Gregory closed IO-608. --------------------------- Resolution: Fixed In git master. > Add a convenience NullPrintStream > --------------------------------- > > Key: IO-608 > URL: https://issues.apache.org/jira/browse/IO-608 > Project: Commons IO > Issue Type: New Feature > Components: Streams/Writers > Reporter: Gary Gregory > Assignee: Gary Gregory > Priority: Major > Fix For: 2.7 > > > We have a handy {{NullOutputStream}}. > > I'd like to add a convenience {{NullPrintStream}}, which would dead simple: > > {code:java} > /** > * This PrintStream writes all data to the famous <b>/dev/null</b>. > * <p> > * This print stream has no destination (file/socket etc.) and all bytes > written to it are ignored and lost. > * </p> > * @since 2.7 > */ > public class NullPrintStream extends PrintStream { > public static final NullPrintStream NULL_PRINT_STREAM = new > NullPrintStream(); > @SuppressWarnings("resource") > public NullPrintStream() { > super(new NullOutputStream()); > } > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)