[jboss-cvs] JBossAS SVN: r94535 - projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 8 23:31:37 EDT 2009
Author: david.lloyd at jboss.com
Date: 2009-10-08 23:31:37 -0400 (Thu, 08 Oct 2009)
New Revision: 94535
Modified:
projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/VFSUtils.java
Log:
Add empty stream util method.
Modified: projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/VFSUtils.java
===================================================================
--- projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/VFSUtils.java 2009-10-09 03:22:38 UTC (rev 94534)
+++ projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/VFSUtils.java 2009-10-09 03:31:37 UTC (rev 94535)
@@ -669,4 +669,19 @@
}
}
}
+
+ private static final InputStream EMPTY_STREAM = new InputStream() {
+ public int read() throws IOException {
+ return -1;
+ }
+ };
+
+ /**
+ * Get the empty input stream. This stream always reports an immediate EOF.
+ *
+ * @return the empty input stream
+ */
+ public static InputStream emptyStream() {
+ return EMPTY_STREAM;
+ }
}
More information about the jboss-cvs-commits
mailing list