commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1526632 - /commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDisk.java
Date Thu, 26 Sep 2013 18:03:28 GMT
Author: sebb
Date: Thu Sep 26 18:03:28 2013
New Revision: 1526632

URL: http://svn.apache.org/r1526632
Log:
Document why the header size is 4 bytes

Modified:
    commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDisk.java

Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDisk.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDisk.java?rev=1526632&r1=1526631&r2=1526632&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDisk.java
(original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDisk.java
Thu Sep 26 18:03:28 2013
@@ -48,7 +48,8 @@ public class BlockDisk
     private static final Log log = LogFactory.getLog( BlockDisk.class );
 
     /** The size of the header that indicates the amount of data stored in an occupied block.
*/
-    public static final byte HEADER_SIZE_BYTES = 4;
+    public static final byte HEADER_SIZE_BYTES = 4; 
+    // N.B. 4 bytes is the size used for ByteBuffer.putInt(int value) and ByteBuffer.getInt()
 
     /** defaults to 4kb */
     private static final int DEFAULT_BLOCK_SIZE_BYTES = 4 * 1024;



Mime
View raw message