Back to project page Volley-Ball.
The source code is released under:
MIT License
If you think the Android project Volley-Ball listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.siu.android.volleyball.samples.volley; /* ww w . j av a 2 s .c om*/ import com.android.volley.toolbox.HurlStack; import com.squareup.okhttp.OkHttpClient; import java.io.IOException; import java.net.HttpURLConnection; import java.net.URL; /** * Created by lukas on 6/26/13. */ public class OkHttpStack extends HurlStack { private final OkHttpClient client; public OkHttpStack() { this(new OkHttpClient()); } public OkHttpStack(OkHttpClient client) { if (client == null) { throw new NullPointerException("Client must not be null."); } this.client = client; } @Override protected HttpURLConnection createConnection(URL url) throws IOException { return client.open(url); } }