comparison src/ch/ethz/ssh2/SFTPOutputStream.java @ 308:42b15aaa7ac7 ganymed

merge
author Carl Byington <carl@five-ten-sg.com>
date Wed, 30 Jul 2014 14:21:50 -0700
parents 071eccdff8ea
children
comparison
equal deleted inserted replaced
306:90e47d99ea54 308:42b15aaa7ac7
38 public void write(byte[] buffer, int offset, int len) throws IOException { 38 public void write(byte[] buffer, int offset, int len) throws IOException {
39 // We can just blindly write the whole buffer at once. 39 // We can just blindly write the whole buffer at once.
40 // if <code>len</code> &gt; 32768, then the write operation will 40 // if <code>len</code> &gt; 32768, then the write operation will
41 // be split into multiple writes in SFTPv3Client#write. 41 // be split into multiple writes in SFTPv3Client#write.
42 handle.getClient().write(handle, writeOffset, buffer, offset, len); 42 handle.getClient().write(handle, writeOffset, buffer, offset, len);
43
44 writeOffset += len; 43 writeOffset += len;
45 } 44 }
46 45
47 @Override 46 @Override
48 public void write(int b) throws IOException { 47 public void write(int b) throws IOException {
49 byte[] buffer = new byte[1]; 48 byte[] buffer = new byte[1];
50 buffer[0] = (byte) b; 49 buffer[0] = (byte) b;
51 handle.getClient().write(handle, writeOffset, buffer, 0, 1); 50 handle.getClient().write(handle, writeOffset, buffer, 0, 1);
52
53 writeOffset += 1; 51 writeOffset += 1;
54 } 52 }
55 53
56 public long skip(long n) { 54 public long skip(long n) {
57 writeOffset += n; 55 writeOffset += n;