Mercurial > hg4j
diff src/com/tmate/hgkit/fs/DataAccessProvider.java @ 51:9429c7bd1920 wrap-data-access
Try DataAccess to reach revision data instead of plain byte arrays
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Sun, 16 Jan 2011 01:20:26 +0100 |
parents | b0a15cefdfd6 |
children |
line wrap: on
line diff
--- a/src/com/tmate/hgkit/fs/DataAccessProvider.java Sat Jan 15 01:41:49 2011 +0100 +++ b/src/com/tmate/hgkit/fs/DataAccessProvider.java Sun Jan 16 01:20:26 2011 +0100 @@ -72,6 +72,16 @@ } @Override + public long length() { + return size; + } + + @Override + public void reset() throws IOException { + seek(0); + } + + @Override public void seek(long offset) { assert offset >= 0; // offset may not necessarily be further than current position in the file (e.g. rewind) @@ -174,6 +184,16 @@ } @Override + public long length() { + return size; + } + + @Override + public void reset() throws IOException { + seek(0); + } + + @Override public void seek(long offset) throws IOException { if (offset > size) { throw new IllegalArgumentException();