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