text
stringlengths
3
1.18M
/*- * Copyright (C) 2011 Peter Baldwin * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program ...
package uiauto; // Import the uiautomator libraries import com.android.uiautomator.core.UiObject; import com.android.uiautomator.core.UiObjectNotFoundException; import com.android.uiautomator.core.UiScrollable; import com.android.uiautomator.core.UiSelector; import com.android.uiautomator.testrunner.UiAutomator...
package com.example.web; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; public class View extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); String url = "http://www.motorola.com"; ...
package com.eugenicsgames.test.sample; public class SampleClass { }
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2011 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2011 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
package com.traffic.sense; import java.io.IOException; import java.io.PrintWriter; import java.net.Socket; import java.net.UnknownHostException; import android.app.Activity; import android.content.Context; import android.location.Location; import android.location.LocationListener; import android.location.LocationMana...
/** * */ package models; import java.util.Date; import javax.persistence.Entity; import javax.persistence.ManyToOne; import play.db.jpa.Model; /** * @author Amr Tj. Wallas * */ @Entity public class Update extends Model { @ManyToOne public Client client; public double longitud...
/** * */ package models; import java.util.ArrayList; import java.util.Date; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.OneToMany; import play.db.jpa.GenericModel; /** * @author Amr Tj. Walla...
/** * */ package models; import java.util.Date; /** * @author Amr Tj. Wallas * */ public class MyUpdate { long device_id; double speed; double longitude,latitude; long date; public MyUpdate(long device_id, double speed, double longitude, double latitude, Date date) ...
/** * */ package controllers; import java.util.ArrayList; import java.util.Date; import java.util.List; import models.Client; import models.MyUpdate; import models.Update; /** * @author Amr Tj. Wallas * */ @CRUD.For(Update.class) public class Statistics extends CRUD { /** * The v...
package controllers; import play.*; import play.mvc.*; import java.util.*; import models.*; public class Application extends Controller { public static void index() { render(); } }
/** * */ package controllers; /** * @author Amr Tj. Wallas * */ public class Clients extends CRUD { }
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.Socket; import java.net.UnknownHostException; /** * Simple client chat app * @author Amr Tj.Wallas */ public class Client extends Thread { Socket s; Buffered...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.MalformedURLException; import java.net.ServerSocket; import java.net.Socket; import java.net.URL; import java.net.URLConnection; /** * Simple Chat Server over TCP ...
package cn.edu.nju.dapenti; import android.content.Context; public class MenuHandlerClear implements MenuHandlerInterface { public void handle(Context context) { DatabaseUtil databaseUtil = DatabaseUtil.initDatabase(context); if (databaseUtil == null) return; databaseUtil.deleteItems(((RSSReader)contex...
package cn.edu.nju.dapenti; import java.util.Hashtable; public abstract class RSSItemInterfaceFactoryMethod { Hashtable<String, RSSItemInterface> ht = new Hashtable<String, RSSItemInterface>(); RSSHandler handler; public RSSItemInterface createRSSItem (String localName) { setRSSHandler(); initH...
package cn.edu.nju.dapenti; import java.io.IOException; import org.xmlpull.v1.XmlPullParserException; public interface RSSHandler { // names of the XML tags static final String PUB_DATE = "pubDate"; static final String DESCRIPTION = "description"; static final String LINK = "link"; static...
package cn.edu.nju.dapenti; import java.util.Hashtable; public class RSSItem { private int id; private RSSItemTitle title; private RSSItemDescription description; private RSSItemPubdate pubdate; private RSSItemAuthor author; private RSSItemLink link; private int feedid; public int getId() { ...
package cn.edu.nju.dapenti; import java.util.List; import java.util.Vector; import cn.edu.nju.dapenti.RSSItem; public class RSSFeed { private int _id = 0; private String _title = null; private String _pubdate = null; private String _description = null; private String _url = null; p...
package cn.edu.nju.dapenti; public class RSSItemLink extends RSSItemInterface { protected RSSHandler handler; public RSSItemLink(RSSHandler handler) { this.handler = handler; } @Override public void setItem(RSSHandler handler, RSSItem item) { setHandler(handler); item.setLink(this); handl...
package cn.edu.nju.dapenti; public class RSSItemDescription extends RSSItemInterface { protected RSSHandler handler; public RSSItemDescription(RSSHandler handler) { this.handler = handler; } @Override public void setItem(RSSHandler handler, RSSItem item) { setHandler(handler); item.setDescrip...
package cn.edu.nju.dapenti; public interface RSSParser { public void parse (String url); }
package cn.edu.nju.dapenti; import android.content.Context; public interface MenuHandlerInterface { public void handle(Context context); }
package cn.edu.nju.dapenti; import android.content.Context; import android.webkit.WebView; public class MenuHandlerRefresh implements MenuHandlerInterface { public void handle(Context context) { if (context instanceof ShowDescription) { ShowDescription showDescription = (ShowDescription) context; ...
package cn.edu.nju.dapenti; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; public class DatabaseUtil { private static DatabaseUtil databaseUtil; DatabaseHelper databaseHelper; private SQLiteDatabase db; ...
package cn.edu.nju.dapenti; public class RSSItemAuthor extends RSSItemInterface { public RSSItemAuthor(RSSHandler h) { this.handler = h; } @Override public void setItem(RSSHandler handler, RSSItem item) { setHandler(handler); item.setAuthor(this); handler.setCurrentItem(null); } }
package cn.edu.nju.dapenti; import android.content.Context; import android.content.Intent; import android.os.Process; public class MenuHandlerQuit implements MenuHandlerInterface { public void handle(Context context) { if (!(context instanceof RSSReader)) { Intent intent = new Intent(Intent.ACTION_M...
package cn.edu.nju.dapenti; import java.util.Hashtable; public class MenuHandlerSimpleFactory { static Hashtable<Integer, MenuHandlerInterface> ht = new Hashtable<Integer, MenuHandlerInterface>(); protected static void initHashtable () { ht.put(R.id.menu_refresh, new MenuHandlerRefresh()); ht.put(...
package cn.edu.nju.dapenti; import android.os.Handler; import android.os.Message; public class ParserUtil { public static RSSFeed sendProgressMsg(int flag, Handler mProgressHandler, RSSFeed _feed) { if (mProgressHandler != null) { Message progressMsg = new Message(); if (_fee...
package cn.edu.nju.dapenti; public abstract class RSSItemInterface { protected RSSItem item; protected RSSHandler handler; protected String content; abstract void setItem(RSSHandler handler, RSSItem item); public void setHandler(RSSHandler handler) { this.handler = handler; } public void se...
package cn.edu.nju.dapenti; public class RSSItemPubdate extends RSSItemInterface { protected RSSHandler handler; public RSSItemPubdate(RSSHandler handler) { this.handler = handler; } @Override public void setItem(RSSHandler handler, RSSItem item) { setHandler(handler); item.setPubdateFromRSS...
package cn.edu.nju.dapenti; public class RSSItemTitle extends RSSItemInterface { protected RSSHandler handler; public RSSItemTitle(RSSHandler handler) { this.handler = handler; } @Override public void setItem(RSSHandler handler, RSSItem item) { setHandler(handler); item.setTitle(this); han...
package cn.edu.nju.dapenti; import android.content.Context; import android.content.res.Resources; import android.util.AttributeSet; import android.view.View; import android.widget.LinearLayout; import android.widget.TabWidget; public class VerticalTabWidget extends TabWidget { Resources res; public Ver...
package cn.edu.nju.dapenti; public interface RSSParserInterface { public void parse (String url); public void setCurrentItem (RSSItemInterface item); }
package cn.edu.nju.dapenti; public class RSSItemInterfaceFactoryXmlPull extends RSSItemInterfaceFactoryMethod{ @Override protected void setRSSHandler() { this.handler = new RSSHandlerXmlPullFeed(); } }
package cn.edu.nju.dapenti; import android.app.Activity; import android.content.Context; import android.content.Intent; public class MenuHandlerSettings implements MenuHandlerInterface { public void handle(Context context) { ((Activity) context).startActivityForResult(new Intent(context, Settings.class),...
package cn.edu.nju.dapenti.db; import cn.edu.nju.dapenti.Settings; import android.content.ContentValues; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class DatabaseHelper extends SQLiteOpenHelper { // If you change the...
package cn.edu.nju.dapenti.db; import cn.edu.nju.dapenti.Settings; import cn.edu.nju.dapenti.entity.RSSFeed; import cn.edu.nju.dapenti.entity.RSSItem; import cn.edu.nju.dapenti.entity.RSSItemAuthor; import cn.edu.nju.dapenti.entity.RSSItemDescription; import cn.edu.nju.dapenti.entity.RSSItemInterface; import c...
package cn.edu.nju.dapenti.db; public abstract class RSSFeedEntry { public static final String TABLE_NAME = "feed"; public static final String _ID = "_id"; public static final String COLUMN_NAME_TITLE = "_title"; public static final String COLUMN_NAME_PUBDATE = "_pubdate"; public static final Stri...
package cn.edu.nju.dapenti.db; import android.provider.BaseColumns; public abstract class RSSItemEntry implements BaseColumns { public static final String TABLE_NAME = "item"; public static final String COLUMN_NAME_TITLE = "_title"; public static final String COLUMN_NAME_DESCRIPTION = "_description"; ...
package cn.edu.nju.dapenti.menu.handler; import android.content.Context; import cn.edu.nju.dapenti.RSSReader; import cn.edu.nju.dapenti.db.DatabaseUtil; public class MenuHandlerClear implements MenuHandlerInterface { public void handle(Context context) { DatabaseUtil databaseUtil = DatabaseUtil.initDatabas...
package cn.edu.nju.dapenti.menu.handler; import android.content.Context; public interface MenuHandlerInterface { public void handle(Context context); }
package cn.edu.nju.dapenti.menu.handler; import cn.edu.nju.dapenti.DescriptionWebView; import cn.edu.nju.dapenti.RSSReader; import cn.edu.nju.dapenti.ShowDescription; import android.content.Context; import android.webkit.WebSettings; public class MenuHandlerRefresh implements MenuHandlerInterface { public...
package cn.edu.nju.dapenti.menu.handler; import cn.edu.nju.dapenti.RSSReader; import android.content.Context; import android.content.Intent; import android.os.Process; public class MenuHandlerQuit implements MenuHandlerInterface { public void handle(Context context) { if (!(context instanceof RSSReader...
package cn.edu.nju.dapenti.menu.handler; import java.util.Hashtable; import cn.edu.nju.dapenti.R; public class MenuHandlerSimpleFactory { static Hashtable<Integer, MenuHandlerInterface> ht = new Hashtable<Integer, MenuHandlerInterface>(); protected static void initHashtable () { ht.put(R.id.menu_r...
package cn.edu.nju.dapenti.menu.handler; import cn.edu.nju.dapenti.Settings; import android.app.Activity; import android.content.Context; import android.content.Intent; public class MenuHandlerSettings implements MenuHandlerInterface { public static final int REQ_SYSTEM_SETTINGS = 1; public void handle(...
package cn.edu.nju.dapenti; import android.content.Context; import android.content.res.Resources; import android.util.AttributeSet; import android.view.View; import android.widget.LinearLayout; import android.widget.TabWidget; public class VerticalTabWidget extends TabWidget { Resources res; public Ver...
package cn.edu.nju.dapenti.entity; import java.util.Hashtable; import cn.edu.nju.dapenti.Settings; import cn.edu.nju.dapenti.utils.StringUtil; public class RSSItem { private int id; private RSSItemTitle title; private RSSItemDescription description; private RSSItemPubdate pubdate; private RSSItemAut...
package cn.edu.nju.dapenti.entity; import java.util.List; import java.util.Vector; import cn.edu.nju.dapenti.entity.RSSItem; public class RSSFeed { private int _id = 0; private String _title = null; private String _pubdate = null; private String _description = null; private String _url ...
package cn.edu.nju.dapenti.entity; import cn.edu.nju.dapenti.rss.RSSHandler; public class RSSItemLink extends RSSItemInterface { protected RSSHandler handler; public RSSItemLink(RSSHandler handler) { this.handler = handler; } @Override public void setItem(RSSHandler handler, RSSItem item) { ...
package cn.edu.nju.dapenti.entity; import cn.edu.nju.dapenti.rss.RSSHandler; public class RSSItemDescription extends RSSItemInterface { protected RSSHandler handler; public RSSItemDescription(RSSHandler handler) { this.handler = handler; } @Override public void setItem(RSSHandler handler, RSSIte...
package cn.edu.nju.dapenti.entity; import cn.edu.nju.dapenti.rss.RSSHandler; public class RSSItemAuthor extends RSSItemInterface { public RSSItemAuthor(RSSHandler h) { this.handler = h; } @Override public void setItem(RSSHandler handler, RSSItem item) { setHandler(handler); item.setAuthor(th...
package cn.edu.nju.dapenti.entity; import cn.edu.nju.dapenti.rss.RSSHandler; public abstract class RSSItemInterface { protected RSSItem item; protected RSSHandler handler; protected String content; public abstract void setItem(RSSHandler handler, RSSItem item); public void setHandler(RSSHandler ha...
package cn.edu.nju.dapenti.entity; import cn.edu.nju.dapenti.rss.RSSHandler; public class RSSItemPubdate extends RSSItemInterface { protected RSSHandler handler; public RSSItemPubdate(RSSHandler handler) { this.handler = handler; } @Override public void setItem(RSSHandler handler, RSSItem item)...
package cn.edu.nju.dapenti.entity; import cn.edu.nju.dapenti.rss.RSSHandler; public class RSSItemTitle extends RSSItemInterface { protected RSSHandler handler; public RSSItemTitle(RSSHandler handler) { this.handler = handler; } @Override public void setItem(RSSHandler handler, RSSItem item) { ...
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
package cn.edu.nju.dapenti.utils; import cn.edu.nju.dapenti.entity.RSSFeed; import android.os.Handler; import android.os.Message; public class ParserUtil { public static RSSFeed sendProgressMsg(int flag, Handler mProgressHandler, RSSFeed _feed) { if (mProgressHandler != null) { Message p...
package cn.edu.nju.dapenti.utils; public class Base64 { public static String encode(byte[] raw) { StringBuffer encoded = new StringBuffer(); for (int i = 0; i < raw.length; i += 3) { encoded.append(encodeBlock(raw, i)); } return encoded.toString(); } protected static char[] encodeBlock(byte[]...
package cn.edu.nju.dapenti.utils; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Environment; public cla...
package cn.edu.nju.dapenti.rss; import java.util.Hashtable; import cn.edu.nju.dapenti.entity.RSSItemAuthor; import cn.edu.nju.dapenti.entity.RSSItemDescription; import cn.edu.nju.dapenti.entity.RSSItemInterface; import cn.edu.nju.dapenti.entity.RSSItemLink; import cn.edu.nju.dapenti.entity.RSSItemPubdate; im...