gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/lava/gzz/storm/impl DirPool.java


From: Benja Fallenstein
Subject: [Gzz-commits] gzz/lava/gzz/storm/impl DirPool.java
Date: Sun, 29 Dec 2002 15:02:49 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Benja Fallenstein <address@hidden>      02/12/29 15:02:49

Modified files:
        lava/gzz/storm/impl: DirPool.java 

Log message:
        Doc, remove superfluous variable

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/lava/gzz/storm/impl/DirPool.java.diff?tr1=1.13&tr2=1.14&r1=text&r2=text

Patches:
Index: gzz/lava/gzz/storm/impl/DirPool.java
diff -u gzz/lava/gzz/storm/impl/DirPool.java:1.13 
gzz/lava/gzz/storm/impl/DirPool.java:1.14
--- gzz/lava/gzz/storm/impl/DirPool.java:1.13   Sun Dec 22 22:20:59 2002
+++ gzz/lava/gzz/storm/impl/DirPool.java        Sun Dec 29 15:02:49 2002
@@ -37,16 +37,20 @@
 
     /** Get the File object for the block
      *  corresponding to a given id.
+     *  This is needed in many places and wrapping it in a convenience
+     *  function makes code easier to read & maintain.
      */
-    protected File getFile(BlockId id) {
+    protected final File getFile(BlockId id) {
        String hex = gzz.util.HexUtil.byteArrToHex(id.getBytes());
        return new File(dir, "b_" + hex);
     }
 
     /** Read the header of the block 
      *  corresponding to the given id.
+     *  Like getFile(), this is needed in a number
+     *  of different places.
      */
-    protected Header822 getFileHeader(BlockId id) throws IOException {
+    protected final Header822 getFileHeader(BlockId id) throws IOException {
        InputStream is = new BufferedInputStream(
             id.getCheckedInputStream(new FileInputStream(getFile(id))));
        Header822 header = Headers822.readHeader(is);
@@ -56,7 +60,6 @@
     
 
     protected class FileBlockOutputStream extends AbstractBlockOutputStream {
-        protected ByteArrayOutputStream baos;
        protected File tempFile;
 
        protected FileBlockOutputStream(Header822 header, File tempFile) 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]