System.arraycopy(hostbytes, 0, requestPacket, 3 + userLen, passLen);
System.arraycopy(getPass().getBytes(), 0, requestPacket, 3 + userLen, passLen);
    private boolean authUserPass(byte[] hostbytes) throws ProxyConnectionException {    	byte[] requestPacket = new byte[1024];    	byte[] response = new byte[2];    	byte userLen = (byte) getUser().getBytes().length;    	byte passLen = (byte) getPass().getBytes().length;    	    	requestPacket[0] = 1;    	requestPacket[1] = userLen;    	// adding the username to the packet        System.arraycopy(hostbytes, 0, requestPacket, 2, userLen);        requestPacket[2 + userLen] = passLen;    	// adding the password to the packet        System.arraycopy(hostbytes, 0, requestPacket, 3 + userLen, passLen);                        try {            this.socket.getOutputStream().write(requestPacket, 0, 3 + userLen + passLen);            this.socket.getInputStream().read(response, 0, 2);        }catch(IOException ioe) {            throw new ProxyConnectionException(-2, "SOCK5 - IOException: " + ioe.getMessage());        }                ProxyConnectionException pce = null;        switch (response[1]) {            case 0:            	return true; // auth successfull            case 1:                pce = new ProxyConnectionException(1, "SOCKS5 general SOCKS server failure");                break;            case 2:                pce = new ProxyConnectionException(2, "SOCKS5 connection not allowed by ruleset");                break;            case 3:                pce = new ProxyConnectionException(3, "SOCKS5 Network unreachable");                break;            case 4:                pce = new ProxyConnectionException(4, "SOCKS5 Host unreachable");                break;            case 5:                pce = new ProxyConnectionException(5, "SOCKS5 Connection refused");                break;            case 6:                pce = new ProxyConnectionException(6, "SOCKS5 TTL expired");                break;            case 7:                pce = new ProxyConnectionException(7, "SOCKS5 Command not supported");                break;            case 8:                pce = new ProxyConnectionException(8, "SOCKS5 Address type not supported");                break;            case 9:                pce = new ProxyConnectionException(9, "SOCKS5 to X'FF' unassigned");                break;            default:                pce = new ProxyConnectionException(-1, "SOCKS5 unknown proxy response");                break;        }                return false;    }