@@ -0,0 +1,3264 @@
+package com.soo.ify.request;%0A%0Aimport java.util.Map.Entry;%0Aimport java.util.Set;%0A%0Aimport android.content.ContentValues;%0A%0A/**Net access locator%0A * @author Soo%0A */%0Apublic final class Nal %7B%0A    %0A    private final String host;%0A    private final String port;%0A    private final String nameSpace;%0A    private final String api;%0A    private ContentValues contentValues = new ContentValues();%0A    %0A    public Nal(String host, String port, String nameSpace, String api) %7B%0A        this.host = host;%0A        this.port = port;%0A        this.nameSpace = nameSpace;%0A        this.api = api;%0A    %7D%0A    %0A    public Nal append(String key, Byte value) %7B%0A        contentValues.put(key, value);%0A        return this;%0A    %7D%0A    %0A    public Nal append(String key, Short value) %7B%0A        contentValues.put(key, value);%0A        return this;%0A    %7D%0A    %0A    public Nal append(String key, Integer value) %7B%0A        contentValues.put(key, value);%0A        return this;%0A    %7D%0A    %0A    public Nal append(String key, Long value) %7B%0A        contentValues.put(key, value);%0A        return this;%0A    %7D%0A    %0A    public Nal append(String key, Float value) %7B%0A        contentValues.put(key, value);%0A        return this;%0A    %7D%0A    %0A    public Nal append(String key, Double value) %7B%0A        contentValues.put(key, value);%0A        return this;%0A    %7D%0A    %0A    public Nal append(String key, String value) %7B%0A        contentValues.put(key, value);%0A        return this;%0A    %7D%0A    %0A    public Nal flush() %7B%0A        contentValues.clear();%0A        return this;%0A    %7D%0A%0A    public String value() %7B%0A        if (host == null) %7B%0A            throw new IllegalArgumentException(%22host must not be null%22);%0A        %7D%0A        StringBuilder result = new StringBuilder();%0A        if (host.endsWith(%22/%22)) %7B%0A            result.append(host.substring(0, host.length() - 1));%0A        %7D else %7B%0A            result.append(host);%0A        %7D%0A        if (port != null) %7B%0A            try %7B%0A                int portValue = Integer.valueOf(port);%0A                if (portValue %3C= 0) %7B%0A                    throw new IllegalArgumentException(%22invalid port=%22 + port);%0A                %7D%0A                result.append(%22:%22);%0A                result.append(port);%0A            %7D catch (Exception e) %7B%0A                throw new IllegalArgumentException(%22invalid port=%22 + port);%0A            %7D%0A        %7D%0A        if (nameSpace != null) %7B%0A            if (!nameSpace.startsWith(%22/%22)) %7B%0A                result.append(%22/%22);%0A            %7D%0A            result.append(nameSpace);%0A        %7D%0A        if (api != null) %7B%0A            if (!api.startsWith(%22/%22)) %7B%0A                result.append(%22/%22);%0A            %7D%0A            result.append(api);%0A        %7D%0A        result.append(cv2s());%0A        return result.toString();%0A    %7D%0A    %0A    private String cv2s() %7B%0A        String str = %22%22;%0A        Set%3CEntry%3CString, Object%3E%3E entries = contentValues.valueSet();%0A        boolean flag = false;%0A        for (Entry%3CString, Object%3E entry : entries) %7B%0A            if (!flag) %7B%0A                str += %22?%22;%0A                flag = true;%0A            %7D else %7B%0A                str += %22&%22;%0A            %7D%0A            str += entry.getKey() + %22=%22 + entry.getValue().toString();%0A        %7D%0A        return str;%0A    %7D%0A    %0A    %0A    @Override%0A    public String toString() %7B%0A        return value();%0A    %7D%0A%7D%0A

add new file