comparison src/ch/ethz/ssh2/SFTPInputStream.java @ 307:071eccdff8ea ganymed

fix java formatting
author Carl Byington <carl@five-ten-sg.com>
date Wed, 30 Jul 2014 14:16:58 -0700
parents 91a31873c42a
children
comparison
equal deleted inserted replaced
305:d2b303406d63 307:071eccdff8ea
32 * @see SFTPClient#read(SFTPFileHandle, long, byte[], int, int) 32 * @see SFTPClient#read(SFTPFileHandle, long, byte[], int, int)
33 */ 33 */
34 @Override 34 @Override
35 public int read(byte[] buffer, int offset, int len) throws IOException { 35 public int read(byte[] buffer, int offset, int len) throws IOException {
36 int read = handle.getClient().read(handle, readOffset, buffer, offset, len); 36 int read = handle.getClient().read(handle, readOffset, buffer, offset, len);
37 if(read > 0) { 37
38 if (read > 0) {
38 readOffset += read; 39 readOffset += read;
39 } 40 }
41
40 return read; 42 return read;
41 } 43 }
42 44
43 /** 45 /**
44 * Reads the next byte of data from the input stream. The value byte is 46 * Reads the next byte of data from the input stream. The value byte is
56 */ 58 */
57 @Override 59 @Override
58 public int read() throws IOException { 60 public int read() throws IOException {
59 byte[] buffer = new byte[1]; 61 byte[] buffer = new byte[1];
60 int b = handle.getClient().read(handle, readOffset, buffer, 0, 1); 62 int b = handle.getClient().read(handle, readOffset, buffer, 0, 1);
61 if(b > 0) { 63
64 if (b > 0) {
62 readOffset += 1; 65 readOffset += 1;
63 } 66 }
67
64 return b; 68 return b;
65 } 69 }
66 70
67 /** 71 /**
68 * Skips over and discards <code>n</code> bytes of data from this input 72 * Skips over and discards <code>n</code> bytes of data from this input