Revision b347d5e3 src/com/rackspace/cloud/files/api/client/ContainerObjectManager.java
b/src/com/rackspace/cloud/files/api/client/ContainerObjectManager.java | ||
---|---|---|
14 | 14 |
import org.apache.http.client.methods.HttpDelete; |
15 | 15 |
import org.apache.http.client.methods.HttpGet; |
16 | 16 |
import org.apache.http.impl.client.BasicResponseHandler; |
17 |
import org.apache.http.impl.client.DefaultHttpClient; |
|
18 | 17 |
import org.apache.http.protocol.RequestExpectContinue; |
19 | 18 |
import org.xml.sax.InputSource; |
20 | 19 |
import org.xml.sax.SAXException; |
21 | 20 |
import org.xml.sax.XMLReader; |
22 | 21 |
|
22 |
import android.content.Context; |
|
23 | 23 |
import android.util.Log; |
24 | 24 |
|
25 | 25 |
import com.rackspace.cloud.files.api.client.parsers.ContainerObjectXMLparser; |
... | ... | |
36 | 36 |
public class ContainerObjectManager extends EntityManager { |
37 | 37 |
|
38 | 38 |
public String LOG = "ContainerObjectManager"; |
39 |
private Context context; |
|
39 | 40 |
public static final String storageToken = Account.getStorageToken(); |
40 | 41 |
|
41 |
|
|
42 |
public ContainerObjectManager(Context context) { |
|
43 |
this.context = context; |
|
44 |
} |
|
42 | 45 |
|
43 | 46 |
public ArrayList<ContainerObjects> createList(boolean detail, String passName) throws CloudServersException { |
44 | 47 |
|
45 |
|
|
46 |
DefaultHttpClient httpclient = new DefaultHttpClient(); |
|
48 |
CustomHttpClient httpclient = new CustomHttpClient(context); |
|
47 | 49 |
HttpGet get = new HttpGet(Account.getStorageUrl()+"/"+passName+"?format=xml"); |
48 | 50 |
ArrayList<ContainerObjects> files = new ArrayList<ContainerObjects>(); |
49 | 51 |
|
... | ... | |
103 | 105 |
|
104 | 106 |
public HttpResponse deleteObject(String Container, String Object) throws CloudServersException { |
105 | 107 |
HttpResponse resp = null; |
106 |
DefaultHttpClient httpclient = new DefaultHttpClient();
|
|
108 |
CustomHttpClient httpclient = new CustomHttpClient(context);
|
|
107 | 109 |
HttpDelete deleteObject = new HttpDelete(Account.getStorageUrl() + "/" + Container + "/" + Object); |
108 | 110 |
Log.v(LOG, "the container (deleteObject) vairble "+Container+" "+Object); |
109 | 111 |
|
Also available in: Unified diff