public byte[] getString() { int i=getInt(); byte[] foo=new byte[i]; getByte(foo, 0, i); return foo; } byte[] getString(int[]start, int[]len) {
byte[] getString(int[]start, int[]len) { int i=getInt(); start[0]=getByte(i); len[0]=i; return buffer; } public void reset(){
public byte[] getMPInt() { int i = getInt(); // uint32 if (i < 0 || // bigger than 0x7fffffff i > 8 * 1024) { i = 8 * 1024; // the session will be broken, but working around OOME. } byte[] foo = new byte[i]; getByte(foo, 0, i); return foo; }
public byte[] getString() { int i = getInt(); // uint32 if(i<0 || // bigger than 0x7fffffff i>256*1024){ // TODO: an exception should be thrown. i = 256*1024; // the session will be broken, but working around OOME. } byte[] foo=new byte[i]; getByte(foo, 0, i); return foo; } byte[] getString(int[]start, int[]len) {
byte[] getString(int[]start, int[]len) { int i=getInt(); start[0]=getByte(i); len[0]=i; return buffer; } public void reset(){
public byte[] getMPInt() { int i=getInt(); // uint32 if(i<0 || // bigger than 0x7fffffff i>8*1024){ // TODO: an exception should be thrown. i = 8*1024; // the session will be broken, but working around OOME. } byte[] foo=new byte[i]; getByte(foo, 0, i); return foo; } public byte[] getMPIntBits() {
public byte[] getString() { int i = getInt(); // uint32 if (i < 0 || // bigger than 0x7fffffff i > 256 * 1024) { i = 256 * 1024; // the session will be broken, but working around OOME. } byte[] foo = new byte[i]; getByte(foo, 0, i); return foo; }
public byte[] getMPInt() { int i=getInt(); // uint32 if(i<0 || // bigger than 0x7fffffff i>8*1024){ // TODO: an exception should be thrown. i = 8*1024; // the session will be broken, but working around OOME. } byte[] foo=new byte[i]; getByte(foo, 0, i); return foo; } public byte[] getMPIntBits() {
byte[][] getBytes(int n, String msg) throws JSchException { byte[][] tmp = new byte[n][]; for(int i = 0; i < n; i++){ int j = getInt(); if(getLength() < j){ throw new JSchException(msg); } tmp[i] = new byte[j]; getByte(tmp[i]); } return tmp; }