Java Exceptions.illegalArgument方法代码示例

本文整理汇总了Java中com.zhy.http.okhttp.utils.Exceptions.illegalArgument方法的典型用法代码示例。如果您正苦于以下问题:Java Exceptions.illegalArgument方法的具体用法?Java Exceptions.illegalArgument怎么用?Java Exceptions.illegalArgument使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.zhy.http.okhttp.utils.Exceptions的用法示例。


Java Exceptions.illegalArgument方法代码示例

在下文中一共展示了Exceptions.illegalArgument方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: PostStringRequest

import com.zhy.http.okhttp.utils.Exceptions; //导入方法依赖的package包/类
public PostStringRequest(String url, Object tag, Map<String, String> params, Map<String, String> headers, String content, MediaType mediaType,int id)
{
    super(url, tag, params, headers,id);
    this.content = content;
    this.mediaType = mediaType;

    if (this.content == null)
    {
        Exceptions.illegalArgument("the content can not be null !");
    }
    if (this.mediaType == null)
    {
        this.mediaType = MEDIA_TYPE_PLAIN;
    }

} 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:17,代码来源:PostStringRequest.java

示例2: OkHttpRequest

import com.zhy.http.okhttp.utils.Exceptions; //导入方法依赖的package包/类
protected OkHttpRequest(String url, Object tag,
                        Map<String, String> params, Map<String, String> headers,int id)
{
    this.url = url;
    this.tag = tag;
    this.params = params;
    this.headers = headers;
    this.id = id ;

    if (url == null)
    {
        Exceptions.illegalArgument("url can not be null.");
    }

    initBuilder();
} 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:17,代码来源:OkHttpRequest.java

示例3: PostStringRequest

import com.zhy.http.okhttp.utils.Exceptions; //导入方法依赖的package包/类
public PostStringRequest(String url, Object tag, Map<String, String> params, Map<String, String> headers, String content, MediaType mediaType)
{
    super(url, tag, params, headers);
    this.content = content;
    this.mediaType = mediaType;

    if (this.content == null)
    {
        Exceptions.illegalArgument("the content can not be null !");
    }
    if (this.mediaType == null)
    {
        this.mediaType = MEDIA_TYPE_PLAIN;
    }

} 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:17,代码来源:PostStringRequest.java

示例4: PostFileRequest

import com.zhy.http.okhttp.utils.Exceptions; //导入方法依赖的package包/类
public PostFileRequest(String url, Object tag, Map<String, String> params, Map<String, String> headers, File file, MediaType mediaType,int id)
{
    super(url, tag, params, headers,id);
    this.file = file;
    this.mediaType = mediaType;

    if (this.file == null)
    {
        Exceptions.illegalArgument("the file can not be null !");
    }
    if (this.mediaType == null)
    {
        this.mediaType = MEDIA_TYPE_STREAM;
    }
} 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:PostFileRequest.java

示例5: buildRequestBody

import com.zhy.http.okhttp.utils.Exceptions; //导入方法依赖的package包/类
@Override
protected RequestBody buildRequestBody()
{
    if (requestBody == null && TextUtils.isEmpty(content) && HttpMethod.requiresRequestBody(method))
    {
        Exceptions.illegalArgument("requestBody and content can not be null in method:" + method);
    }

    if (requestBody == null && !TextUtils.isEmpty(content))
    {
        requestBody = RequestBody.create(MEDIA_TYPE_PLAIN, content);
    }

    return requestBody;
} 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:OtherRequest.java

示例6: PostFileRequest

import com.zhy.http.okhttp.utils.Exceptions; //导入方法依赖的package包/类
public PostFileRequest(String url, Object tag, Map<String, String> params, Map<String, String> headers, File file, MediaType mediaType)
{
    super(url, tag, params, headers);
    this.file = file;
    this.mediaType = mediaType;

    if (this.file == null)
    {
        Exceptions.illegalArgument("the file can not be null !");
    }
    if (this.mediaType == null)
    {
        this.mediaType = MEDIA_TYPE_STREAM;
    }
} 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:16,代码来源:PostFileRequest.java

示例7: OkHttpRequest

import com.zhy.http.okhttp.utils.Exceptions; //导入方法依赖的package包/类
protected OkHttpRequest(String url, Object tag,
                        Map<String, String> params, Map<String, String> headers)
{
    this.url = url;
    this.tag = tag;
    this.params = params;
    this.headers = headers;

    if (url == null)
    {
        Exceptions.illegalArgument("url can not be null.");
    }

    initBuilder();
} 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:16,代码来源:OkHttpRequest.java

示例8: getCookieStore

import com.zhy.http.okhttp.utils.Exceptions; //导入方法依赖的package包/类
public CookieStore getCookieStore()
{
    final CookieJar cookieJar = mOkHttpClient.cookieJar();
    if (cookieJar == null)
    {
        Exceptions.illegalArgument("you should invoked okHttpClientBuilder.cookieJar() to set a cookieJar.");
    }
    if (cookieJar instanceof HasCookieStore)
    {
        return ((HasCookieStore) cookieJar).getCookieStore();
    } else
    {
        return null;
    }
} 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:16,代码来源:OkHttpUtils.java

示例9: CookieJarImpl

import com.zhy.http.okhttp.utils.Exceptions; //导入方法依赖的package包/类
public CookieJarImpl(CookieStore cookieStore)
{
    if (cookieStore == null) Exceptions.illegalArgument("cookieStore can not be null.");
    this.cookieStore = cookieStore;
} 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:6,代码来源:CookieJarImpl.java

本文标签属性:

示例:示例图

代码:代码大全可复制

java:javascript什么意思

Exceptions:Exceptions

illegalArgument:illegalargument异常怎么解决

上一篇:什么是野生动植物?(野生动植物保护条例解读)(野生动植物保护条例解读为什么要保护野生动植物)
下一篇:2狗打架致主人伤残(狗打架致狗受伤谁责任)(2狗打架致主人伤残的1点解答2狗打架致主人伤残的解答)

为您推荐