本文整理匯總了Java中com.panoramagl.downloaders.PLFileDownloaderListener類的典型用法代碼示例。如果您正苦於以下問題:Java PLFileDownloaderListener類的具體用法?Java PLFileDownloaderListener怎麽用?Java PLFileDownloaderListener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PLFileDownloaderListener類屬於com.panoramagl.downloaders包,在下文中一共展示了PLFileDownloaderListener類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: requestJSON
import com.panoramagl.downloaders.PLFileDownloaderListener; //導入依賴的package包/類
/**json methods*/
protected void requestJSON(PLFileDownloaderListener listener)
{
try
{
if(mURL != null)
{
if(this.isHTTPURL(mURL))
new PLHTTPFileDownloader(mURL, listener).downloadAsynchronously();
else
new PLLocalFileDownloader(mView.getActivity().getApplicationContext(), mURL, listener).downloadAsynchronously();
}
else if(mJSONData != null)
new Thread(new PLDataRunnable(listener, mURL, mJSONData, System.currentTimeMillis())).start();
else
listener.didErrorDownload(mURL, "JSON string is empty", -1, null);
}
catch(Throwable e)
{
PLLog.error("PLJSONLoader::requestJSON", e);
listener.didErrorDownload(mURL, e.getMessage(), -1, null);
}
}
示例2: requestJSON
import com.panoramagl.downloaders.PLFileDownloaderListener; //導入依賴的package包/類
/**json methods*/
protected void requestJSON(PLFileDownloaderListener listener)
{
try
{
if(mURL != null)
{
if(this.isHTTPURL(mURL))
new PLHTTPFileDownloader(mURL, listener).downloadAsynchronously();
else
new PLLocalFileDownloader(mView.getContext().getApplicationContext(), mURL, listener).downloadAsynchronously();
}
else if(mJSONData != null)
new Thread(new PLDataRunnable(listener, mURL, mJSONData, System.currentTimeMillis())).start();
else
listener.didErrorDownload(mURL, "JSON string is empty", -1, null);
}
catch(Throwable e)
{
PLLog.error("PLJSONLoader::requestJSON", e);
listener.didErrorDownload(mURL, e.getMessage(), -1, null);
}
}
示例3: PLDataRunnable
import com.panoramagl.downloaders.PLFileDownloaderListener; //導入依賴的package包/類
/**init methods*/
public PLDataRunnable(PLFileDownloaderListener listener, String url, byte[] data, long startTime)
{
super();
mListener = listener;
mURL = url;
mData = data;
mStartTime = startTime;
}