comparison src/org/tmatesoft/hg/repo/HgDataFile.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 a5198b6487dc
comparison
equal deleted inserted replaced
157:d5268ca7715b 158:b413b16d10a5
318 metadata = _metadata; 318 metadata = _metadata;
319 } 319 }
320 320
321 @Override 321 @Override
322 protected void prepare(int revisionNumber, DataAccess da) throws HgException, IOException { 322 protected void prepare(int revisionNumber, DataAccess da) throws HgException, IOException {
323 long daLength = da.length(); 323 final int daLength = da.length();
324 if (daLength < 4 || da.readByte() != 1 || da.readByte() != 10) { 324 if (daLength < 4 || da.readByte() != 1 || da.readByte() != 10) {
325 metadata.recordNone(revisionNumber); 325 metadata.recordNone(revisionNumber);
326 da.reset(); 326 da.reset();
327 return; 327 return;
328 } 328 }