Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/HgWorkingCopyStatusCollector.java @ 148:1a7a9a20e1f9
Exceptions, javadoc. Initial cancel and progress support
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Wed, 23 Feb 2011 22:36:28 +0100 |
| parents | 37a34044e6bd |
| children | d5268ca7715b |
comparison
equal
deleted
inserted
replaced
| 147:a05145db4d0c | 148:1a7a9a20e1f9 |
|---|---|
| 260 ByteBuffer fb = ByteBuffer.allocate(min(data.length, 8192)); | 260 ByteBuffer fb = ByteBuffer.allocate(min(data.length, 8192)); |
| 261 final boolean[] checkValue = new boolean[] { true }; | 261 final boolean[] checkValue = new boolean[] { true }; |
| 262 ByteChannel check = new ByteChannel() { | 262 ByteChannel check = new ByteChannel() { |
| 263 int x = 0; | 263 int x = 0; |
| 264 final boolean debug = false; // XXX may want to add global variable to allow clients to turn | 264 final boolean debug = false; // XXX may want to add global variable to allow clients to turn |
| 265 public int write(ByteBuffer buffer) throws Exception { | 265 public int write(ByteBuffer buffer) { |
| 266 for (int i = buffer.remaining(); i > 0; i--, x++) { | 266 for (int i = buffer.remaining(); i > 0; i--, x++) { |
| 267 if (data[x] != buffer.get()) { | 267 if (data[x] != buffer.get()) { |
| 268 if (debug) { | 268 if (debug) { |
| 269 byte[] xx = new byte[15]; | 269 byte[] xx = new byte[15]; |
| 270 if (buffer.position() > 5) { | 270 if (buffer.position() > 5) { |
