Author: nextgens
Date: 2008-08-25 21:30:02 +0000 (Mon, 25 Aug 2008)
New Revision: 22150

Modified:
   trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java
Log:
PaddedEphemerallyEncryptedBucket: restore write(byte[])

Modified: 
trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java
===================================================================
--- trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java  
2008-08-25 21:27:01 UTC (rev 22149)
+++ trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java  
2008-08-25 21:30:02 UTC (rev 22150)
@@ -151,7 +151,17 @@
                        }
                }

+               // Override this or FOS will use write(int)
                @Override
+               public void write(byte[] buf) throws IOException {
+                       if(closed)
+                               throw new IOException("Already closed!");
+                       if(streamNumber != lastOutputStream)
+                               throw new IllegalStateException("Writing to old 
stream in "+getName());
+                       write(buf, 0, buf.length);
+               }
+               
+               @Override
                public void write(byte[] buf, int offset, int length) throws 
IOException {
                        if(closed) throw new IOException("Already closed!");
                        if(streamNumber != lastOutputStream)


Reply via email to