Skip to content

Commit 66ea674

Browse files
committed
Organize import and added javadoc.
1 parent 28a27ff commit 66ea674

File tree

2 files changed

+29
-11
lines changed

2 files changed

+29
-11
lines changed

src/com/androidquery/AbstractAQuery.java

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,14 @@ public T id(View view){
313313
return self();
314314
}
315315

316+
317+
/**
318+
* Points the current operating view to the specified view with tag.
319+
*
320+
* @param tag
321+
* @return self
322+
*/
323+
316324
public T id(String tag){
317325
return id(findView(tag));
318326
}
@@ -411,6 +419,12 @@ public T policy(int cachePolicy){
411419
return self();
412420
}
413421

422+
/**
423+
* Apply the proxy info to next ajax request.
424+
*
425+
* @param transformer transformer
426+
* @return self
427+
*/
414428
public T proxy(String host, int port){
415429
proxy = new HttpHost(host, port);
416430
return self();
@@ -1833,6 +1847,7 @@ protected void reset(){
18331847
policy = CACHE_DEFAULT;
18341848
proxy = null;
18351849

1850+
18361851
}
18371852

18381853

@@ -1992,6 +2007,17 @@ public <K> T delete(String url, Class<K> type, AjaxCallback<K> callback){
19922007

19932008
}
19942009

2010+
/**
2011+
* Ajax HTTP put.
2012+
*
2013+
* @param url url
2014+
* @param contentHeader Content-Type header
2015+
* @param type reponse type
2016+
* @param callback callback
2017+
* @return self
2018+
*
2019+
*/
2020+
19952021
public <K> T put(String url, String contentHeader, HttpEntity entity, Class<K> type, AjaxCallback<K> callback){
19962022

19972023
callback.url(url).type(type).method(AQuery.METHOD_PUT).header("Content-Type", contentHeader).param(AQuery.POST_ENTITY, entity);
@@ -2148,7 +2174,7 @@ public Bitmap getCachedImage(int resId){
21482174
/**
21492175
* @deprecated As of release 0.21.3, replaced by shouldDelay(int position, View convertView, ViewGroup parent, String url)
21502176
*
2151-
* This method is less efficicent and promote file check which could hold up the UI thread.
2177+
* This method is less efficient and promote file check which could hold up the UI thread.
21522178
*
21532179
* {@link #shouldDelay(int position, View convertView, ViewGroup parent, String url)}
21542180
*/
@@ -2161,7 +2187,7 @@ public Bitmap getCachedImage(int resId){
21612187
/**
21622188
* @deprecated As of release 0.21.3, replaced by shouldDelay(int position, View convertView, ViewGroup parent, String url)
21632189
*
2164-
* This method is less efficicent and promote file check which could hold up the UI thread.
2190+
* This method is less efficient and promote file check which could hold up the UI thread.
21652191
*
21662192
* {@link #shouldDelay(int position, View convertView, ViewGroup parent, String url)}
21672193
*/

src/com/androidquery/util/AQUtility.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import java.util.Arrays;
3232
import java.util.HashMap;
3333
import java.util.Map;
34-
import java.util.concurrent.ExecutorService;
3534
import java.util.concurrent.Executors;
3635
import java.util.concurrent.ScheduledExecutorService;
3736
import java.util.concurrent.TimeUnit;
@@ -393,14 +392,11 @@ private static byte[] getMD5(byte[] data){
393392

394393
private static final int IO_BUFFER_SIZE = 1024 * 4;
395394
public static void copy(InputStream in, OutputStream out) throws IOException {
396-
//copy(in, out, 0, null, null);
397395
copy(in, out, 0, null);
398396
}
399397

400398
public static void copy(InputStream in, OutputStream out, int max, Progress progress) throws IOException {
401399

402-
AQUtility.debug("content header", max);
403-
404400
if(progress != null){
405401
progress.reset();
406402
progress.setBytes(max);
@@ -542,11 +538,7 @@ private static String getCacheFileName(String url){
542538
String hash = getMD5Hex(url);
543539
return hash;
544540
}
545-
/*
546-
public static File getExistedCacheByUrl(Context context, String url){
547-
return getExistedCacheByUrl(getCacheDir(context), url);
548-
}
549-
*/
541+
550542
public static File getCacheFile(File dir, String url){
551543
if(url == null) return null;
552544
if(url.startsWith(File.separator)){

0 commit comments

Comments
 (0)