This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.net.*; | |
import java.io.*; | |
public class ClassLoaderPropTest | |
{ | |
public static void main(String[] args) | |
throws IOException | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.sql.*; | |
import java.util.*; | |
import java.net.*; | |
public class URLClassLoaderTest | |
{ | |
private static Connection conn; | |
//定义一个获取数据库连接方法 | |
public static Connection getConn(String url , | |
String user , String pass) throws Exception |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.lang.reflect.*; | |
public class GenericTest | |
{ | |
private Map<String , Integer> score; | |
public static void main(String[] args) throws Exception | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.reflect.Method; | |
import java.lang.reflect.ParameterizedType; | |
import java.lang.reflect.Type; | |
import java.util.Collection; | |
import java.util.Map; | |
public class Test { | |
public static void main(String[] args) throws NoSuchMethodException { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MessengerActivity extends Activity { | |
private static final String TAG = "MessengerActivity"; | |
private Messenger mService; | |
private Messenger mGetReplyMessenger = new Messenger(new MessengerHandler()); | |
private static class MessengerHandler extends Handler { | |
@Override | |
public void handleMessage(Message msg) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MessengerService extends Service { | |
private static final String TAG = "MessengerService"; | |
private static class MessengerHandler extends Handler { | |
@Override | |
public void handleMessage(Message msg) { | |
switch (msg.what) { | |
case MyConstants.MSG_FROM_CLIENT: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IBookManager extends android.os.IInterface { | |
/** | |
* Local-side IPC implementation stub class. | |
*/ | |
public static abstract class Stub extends android.os.Binder implements tk.thinkerzhangyan.ipcapplication.IBookManager { | |
private static final java.lang.String DESCRIPTOR = "tk.thinkerzhangyan.ipcapplication.IBookManager"; | |
/** | |
* Construct the stub at attach it to the interface. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Book implements Parcelable { | |
public int bookId; | |
public String bookName; | |
public Book() { | |
} | |
public Book(int bookId, String bookName) { |