Code example for AssetFileDescriptor

Methods: createInputStream, getLength

0
 
	public void setBodyString(String pBody){
		body = pBody;
	} 
	public void setBodyFile(AssetFileDescriptor file) throws IOException{
		stream = file.createInputStream();
		streamLength = file.getLength();
	} 
	 
	public String getCached(){
		prepRequest(); 
		return data.getString(url, null);
	} 
	 
	public void addGetArg(String key, String value) throws URISyntaxException{
		url += key+"="+value+"&";
		request.setURI(new URI(url));
	} 
	 
	@Override 
	protected void onPreExecute() {