comparison src/org/tmatesoft/hg/internal/ByteArrayChannel.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 7567f4a42fe5
children e1b29756f901
comparison
equal deleted inserted replaced
147:a05145db4d0c 148:1a7a9a20e1f9
47 target = ByteBuffer.allocate(size); 47 target = ByteBuffer.allocate(size);
48 } 48 }
49 } 49 }
50 50
51 // TODO document what happens on write after toArray() in each case 51 // TODO document what happens on write after toArray() in each case
52 public int write(ByteBuffer buffer) throws Exception { 52 public int write(ByteBuffer buffer) {
53 int rv = buffer.remaining(); 53 int rv = buffer.remaining();
54 if (buffers == null) { 54 if (buffers == null) {
55 target.put(buffer); 55 target.put(buffer);
56 } else { 56 } else {
57 ByteBuffer copy = ByteBuffer.allocate(rv); 57 ByteBuffer copy = ByteBuffer.allocate(rv);