commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r601751 - in /commons/proper/io/trunk/src/java/org/apache/commons/io: input/ClosedInputStream.java output/ClosedOutputStream.java output/NullOutputStream.java output/NullWriter.java
Date Thu, 06 Dec 2007 14:55:46 GMT
Author: niallp
Date: Thu Dec  6 06:55:45 2007
New Revision: 601751

URL: http://svn.apache.org/viewvc?rev=601751&view=rev
Log:
IO-143 Added Singleton Constants in several stream classes - thanks to Nikunj Trivedi for
the patch

Modified:
    commons/proper/io/trunk/src/java/org/apache/commons/io/input/ClosedInputStream.java
    commons/proper/io/trunk/src/java/org/apache/commons/io/output/ClosedOutputStream.java
    commons/proper/io/trunk/src/java/org/apache/commons/io/output/NullOutputStream.java
    commons/proper/io/trunk/src/java/org/apache/commons/io/output/NullWriter.java

Modified: commons/proper/io/trunk/src/java/org/apache/commons/io/input/ClosedInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/input/ClosedInputStream.java?rev=601751&r1=601750&r2=601751&view=diff
==============================================================================
--- commons/proper/io/trunk/src/java/org/apache/commons/io/input/ClosedInputStream.java (original)
+++ commons/proper/io/trunk/src/java/org/apache/commons/io/input/ClosedInputStream.java Thu
Dec  6 06:55:45 2007
@@ -30,6 +30,11 @@
  * @since Commons IO 1.4
  */
 public class ClosedInputStream extends InputStream {
+    
+    /**
+     * A singleton.
+     */
+    public static final ClosedInputStream CLOSED_INPUT_STREAM = new ClosedInputStream();
 
     /**
      * Returns -1 to indicate that the stream is closed.

Modified: commons/proper/io/trunk/src/java/org/apache/commons/io/output/ClosedOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/output/ClosedOutputStream.java?rev=601751&r1=601750&r2=601751&view=diff
==============================================================================
--- commons/proper/io/trunk/src/java/org/apache/commons/io/output/ClosedOutputStream.java
(original)
+++ commons/proper/io/trunk/src/java/org/apache/commons/io/output/ClosedOutputStream.java
Thu Dec  6 06:55:45 2007
@@ -31,6 +31,11 @@
  * @since Commons IO 1.4
  */
 public class ClosedOutputStream extends OutputStream {
+    
+    /**
+     * A singleton.
+     */
+    public static final ClosedOutputStream CLOSED_OUTPUT_STREAM = new ClosedOutputStream();
 
     /**
      * Throws an {@link IOException} to indicate that the stream is closed.

Modified: commons/proper/io/trunk/src/java/org/apache/commons/io/output/NullOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/output/NullOutputStream.java?rev=601751&r1=601750&r2=601751&view=diff
==============================================================================
--- commons/proper/io/trunk/src/java/org/apache/commons/io/output/NullOutputStream.java (original)
+++ commons/proper/io/trunk/src/java/org/apache/commons/io/output/NullOutputStream.java Thu
Dec  6 06:55:45 2007
@@ -29,6 +29,11 @@
  * @version $Id$
  */
 public class NullOutputStream extends OutputStream {
+    
+    /**
+     * A singleton.
+     */
+    public static final NullOutputStream NULL_OUTPUT_STREAM = new NullOutputStream();
 
     /**
      * @see java.io.OutputStream#write(byte[], int, int)

Modified: commons/proper/io/trunk/src/java/org/apache/commons/io/output/NullWriter.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/output/NullWriter.java?rev=601751&r1=601750&r2=601751&view=diff
==============================================================================
--- commons/proper/io/trunk/src/java/org/apache/commons/io/output/NullWriter.java (original)
+++ commons/proper/io/trunk/src/java/org/apache/commons/io/output/NullWriter.java Thu Dec
 6 06:55:45 2007
@@ -27,6 +27,11 @@
  * @version $Id$
  */
 public class NullWriter extends Writer {
+    
+    /**
+     * A singleton.
+     */
+    public static final NullWriter NULL_WRITER = new NullWriter();
 
     /**
      * Constructs a new NullWriter.



Mime
View raw message