### Eclipse Workspace Patch 1.0
#P classpath
Index: javax/crypto/CipherOutputStream.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/crypto/CipherOutputStream.java,v
retrieving revision 1.3
diff -u -r1.3 CipherOutputStream.java
--- javax/crypto/CipherOutputStream.java	22 Oct 2006 16:13:04 -0000	1.3
+++ javax/crypto/CipherOutputStream.java	1 Feb 2007 01:18:12 -0000
@@ -147,6 +147,8 @@
    */
   public void write(byte[] buf, int off, int len) throws IOException
   {
-    out.write(cipher.update(buf, off, len));
+    byte[] b = cipher.update(buf, off, len);
+    if (b != null)
+      super.write(b);
   }
 }
