Mercurial > jhg
comparison src/org/tmatesoft/hg/internal/ByteArrayDataAccess.java @ 158:b413b16d10a5
Integer offsets and file length explictly, rather than casts throughout code. Inflater may benefit from total length hint, but shall calculate it by its own if needed
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 09 Mar 2011 13:16:37 +0100 |
parents | d5268ca7715b |
children | 6c22bdc0bdfd |
comparison
equal
deleted
inserted
replaced
157:d5268ca7715b | 158:b413b16d10a5 |
---|---|
62 public ByteArrayDataAccess reset() { | 62 public ByteArrayDataAccess reset() { |
63 pos = 0; | 63 pos = 0; |
64 return this; | 64 return this; |
65 } | 65 } |
66 @Override | 66 @Override |
67 public long length() { | 67 public int length() { |
68 return length; | 68 return length; |
69 } | 69 } |
70 @Override | 70 @Override |
71 public void seek(long offset) { | 71 public void seek(int offset) { |
72 pos = (int) offset; | 72 pos = (int) offset; |
73 } | 73 } |
74 @Override | 74 @Override |
75 public void skip(int bytes) throws IOException { | 75 public void skip(int bytes) throws IOException { |
76 seek(pos + bytes); | 76 seek(pos + bytes); |