Mercurial > hg4j
comparison cmdline/org/tmatesoft/hg/console/Main.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 | 3a7696fb457c |
comparison
equal
deleted
inserted
replaced
157:d5268ca7715b | 158:b413b16d10a5 |
---|---|
74 HgDataFile f1 = hgRepo.getFileNode("src/com/tmate/hgkit/console/Bundle.java"); | 74 HgDataFile f1 = hgRepo.getFileNode("src/com/tmate/hgkit/console/Bundle.java"); |
75 HgDataFile f2 = hgRepo.getFileNode("test-repos.jar"); | 75 HgDataFile f2 = hgRepo.getFileNode("test-repos.jar"); |
76 System.out.println(f1.isCopy()); | 76 System.out.println(f1.isCopy()); |
77 System.out.println(f2.isCopy()); | 77 System.out.println(f2.isCopy()); |
78 ByteArrayChannel bac = new ByteArrayChannel(); | 78 ByteArrayChannel bac = new ByteArrayChannel(); |
79 f1.content(0, bac); | 79 f1.content(1, bac); // 0: 1151, 1: 1139 |
80 System.out.println(bac.toArray().length); | |
81 f2.content(0, bac = new ByteArrayChannel()); // 0: 14269 | |
80 System.out.println(bac.toArray().length); | 82 System.out.println(bac.toArray().length); |
81 } | 83 } |
82 | 84 |
83 private void dumpIgnored() { | 85 private void dumpIgnored() { |
84 HgInternals debug = new HgInternals(hgRepo); | 86 HgInternals debug = new HgInternals(hgRepo); |