comparison src/org/tmatesoft/hg/internal/DataAccess.java @ 420:6c22bdc0bdfd

Respect long offsets in revlogs
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 22 Mar 2012 22:56:01 +0100
parents 528b6780a8bd
children fdd7d756dea0
comparison
equal deleted inserted replaced
419:7f136a3fa671 420:6c22bdc0bdfd
31 public class DataAccess { 31 public class DataAccess {
32 public boolean isEmpty() { 32 public boolean isEmpty() {
33 return true; 33 return true;
34 } 34 }
35 // TODO throws IOException (few subclasses have non-trivial length() operation) 35 // TODO throws IOException (few subclasses have non-trivial length() operation)
36 // long length and offset are needed only in RevlogStream, makes no sense elsewhere
37 // because chunks Mercurial operates with fit into int (4 bytes actualLength field)
38 // For those that may face large pieces of data (actual data streams) there are #longLength
39 // and #longSeek() to implement
36 public int length() { 40 public int length() {
37 return 0; 41 return 0;
38 } 42 }
43
44 public long longLength() {
45 return length();
46 }
47
48 public void longSeek(long offset) throws IOException {
49 seek(Internals.ltoi(offset));
50 }
51
39 /** 52 /**
40 * get this instance into initial state 53 * get this instance into initial state
41 * @throws IOException 54 * @throws IOException
42 * @return <code>this</code> for convenience 55 * @return <code>this</code> for convenience
43 */ 56 */