comparison src/com/tmate/hgkit/ll/RevlogIndexStreamAccess.java @ 9:d6d2a630f4a6

Access to underlaying file data wrapped into own Access object, implemented with FileChannel and ByteBuffer
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Sat, 25 Dec 2010 04:45:59 +0100
parents dbd663faec1f
children
comparison
equal deleted inserted replaced
8:a78c980749e3 9:d6d2a630f4a6
22 // TODO Auto-generated constructor stub 22 // TODO Auto-generated constructor stub
23 } 23 }
24 24
25 25
26 void readRevlogV0Record() throws IOException { 26 void readRevlogV0Record() throws IOException {
27 DataInput di = stream.getIndexStream(); 27 DataInput di = null; //FIXME stream.getIndexStream();
28 int offset = di.readInt(); 28 int offset = di.readInt();
29 int compressedLen = di.readInt(); 29 int compressedLen = di.readInt();
30 int baseRevision = di.readInt(); 30 int baseRevision = di.readInt();
31 int linkRevision = di.readInt(); 31 int linkRevision = di.readInt();
32 // int r = (((buf[0] & 0xff) << 24) | ((buf[1] & 0xff) << 16) | ((buf[2] & 0xff) << 8) | (buf[3] & 0xff)); 32 // int r = (((buf[0] & 0xff) << 24) | ((buf[1] & 0xff) << 16) | ((buf[2] & 0xff) << 8) | (buf[3] & 0xff));
40 Object nodeidParent2 = buf.clone(); 40 Object nodeidParent2 = buf.clone();
41 } 41 }
42 42
43 // another subclass? 43 // another subclass?
44 void readRevlogNGRecord() throws IOException { 44 void readRevlogNGRecord() throws IOException {
45 DataInput di = stream.getIndexStream(); 45 DataInput di = null; //FIXME stream.getIndexStream();
46 long l = di.readLong(); 46 long l = di.readLong();
47 long offset = l >>> 16; 47 long offset = l >>> 16;
48 int flags = (int) (l & 0X0FFFF); 48 int flags = (int) (l & 0X0FFFF);
49 int compressedLen = di.readInt(); 49 int compressedLen = di.readInt();
50 int actualLen = di.readInt(); 50 int actualLen = di.readInt();