Mercurial > jhg
comparison cmdline/org/tmatesoft/hg/console/Cat.java @ 150:6b55f10ef54b
Unused variables removed.
| author | Alexander Kitaev <kitaev@gmail.com> |
|---|---|
| date | Thu, 24 Feb 2011 18:53:33 +0100 |
| parents | b9700740553a |
| children | d5268ca7715b |
comparison
equal
deleted
inserted
replaced
| 149:868a5a6e9f93 | 150:6b55f10ef54b |
|---|---|
| 16 */ | 16 */ |
| 17 package org.tmatesoft.hg.console; | 17 package org.tmatesoft.hg.console; |
| 18 | 18 |
| 19 import static org.tmatesoft.hg.repo.HgRepository.TIP; | 19 import static org.tmatesoft.hg.repo.HgRepository.TIP; |
| 20 | 20 |
| 21 import java.io.IOException; | |
| 21 import java.io.OutputStream; | 22 import java.io.OutputStream; |
| 22 import java.nio.ByteBuffer; | 23 import java.nio.ByteBuffer; |
| 23 | 24 |
| 24 import org.tmatesoft.hg.repo.HgDataFile; | 25 import org.tmatesoft.hg.repo.HgDataFile; |
| 25 import org.tmatesoft.hg.repo.HgRepository; | 26 import org.tmatesoft.hg.repo.HgRepository; |
| 59 | 60 |
| 60 public OutputStreamChannel(OutputStream out) { | 61 public OutputStreamChannel(OutputStream out) { |
| 61 stream = out; | 62 stream = out; |
| 62 } | 63 } |
| 63 | 64 |
| 64 public int write(ByteBuffer buffer) throws Exception { | 65 public int write(ByteBuffer buffer) throws IOException { |
| 65 int count = buffer.remaining(); | 66 int count = buffer.remaining(); |
| 66 while(buffer.hasRemaining()) { | 67 while(buffer.hasRemaining()) { |
| 67 stream.write(buffer.get()); | 68 stream.write(buffer.get()); |
| 68 } | 69 } |
| 69 return count; | 70 return count; |
