ÉîÈë̽Ë÷Java¶ÔÏóµÄÐòÁл¯
¶ÔÏóÐòÁл¯¾ÍÊǰѶÔÏóдÈëµ½Êä³öÁ÷ÖУ¬ÓÃÀ´´æ´¢»òÕß´«Êä¡£
¶ÔÏóµÄ·´ÐòÁл¯¾ÍÊÇ´ÓÊäÈëÁ÷ÖжÁÈ¡¶ÔÏó¡£
ÒªÐòÁл¯µÄ¶ÔÏóÓ¦¸ÃʵÏÖSerializable½Ó¿Ú¡£
Serializable½Ó¿ÚÊÇÒ»¸ö±êʶ½Ó¿Ú£¬Ã»ÓгéÏó·½·¨¡£
SerializableÓÐÒ»¸ö×Ó½Ó¿ÚExternalizable£¬ÊµÏÖExternalizable½Ó¿ÚµÄÀà¿ÉÒÔ×ÔÐпØÖƶÔÏóÐòÁл¯ºÉ·´ÐòÁл¯¹ý³Ì¡£
Ò»°ãÀ´Ëµ£¬Ã»ÓбØÒª×Ô¼ºÊµÏÖÐòÁл¯½Ó¿Ú£¬Ö±½Ó½»¸øJavaÐéÄâ»úÊÇÉϲߡ£
ʵÏÖÁËÐòÁл¯½Ó¿ÚµÄÀ࣬Èç¹ûÆä³ÉÔ±²»ÐèÒªÐòÁл¯½øÈ¥£¬ÔòʹÓÃtransient¹Ø¼ü×Ö½øÐÐÐÞÊΡ£
ÏÂÃæ¸ø³ö¸öÀý×Ó£º
import java.io.*;
/**
* Java¶ÔÏóµÄÐòÁл¯²âÊÔ
* File: ObjectStreamTest.java
* User: leizhimin
* Date: 2008-3-12 20:41:43
*/
public class ObjectStreamTest {
public static void main(String args[]) {
testObjectSeri();
testObjectInSeri();
}
/**
* ¶ÔÏóÐòÁл¯²âÊÔ
*/
public static void testObjectSeri() {
Person person = new Person("ÈÛÑÒ", "341022225562156", "lavasoft");
FileOutputStream fos = null;
ObjectOutputStream oos = null;
try {
fos = new FileOutputSt
Ïà¹ØÎĵµ£º
JNI¹¤×÷ÔÀí
ÔÚJNIÖУ¬±¾µØº¯ÊýÊÇͨ¹ýÒ»¸ö¶ÀÁ¢µÄ.c»ò.cppÎļþÀ´ÊµÏÖµÄ(C++ΪJNIÌṩµÄ½çÃæ»á¸ü¼ò½àһЩ)¡£µ±JVMµ÷Óøú¯Êýʱ£¬Ëü´«µÝÁËÒ»¸öJNIEnvÖ¸Õë¡¢Ò»¸öjobjectÖ¸ÕëºÍͨ¹ýJava·½·¨¶¨ÒåµÄJava²ÎÊý£¬JNIº¯ÊýµÄÐÎʽÈçÏ£º
JNIEXPORT void JNICALL Java_ClassName_MethodName
(JNIEnv *env, jobjectobj)
{
......
×÷ΪһÃû³ÌÐòÔ±£¬×ÜÒª¾Àú´ÓС¹æÄ£µÄ¾Ö²¿±àÂëת»»µ½´óÐÍÈí¼þÉè¼Æ¡¢¿ª·¢µÄ¹ý³Ì¡£Ôڴ˹ý³ÌÖУ¬ÔÚÊìϤÁ˱à³ÌÓïÑÔºó£¬ÐèÒª½«ÑÛ¹âÉÏÉýÒ»¸ö²ãÃ棬´ÓÕûÌåÈ¥°ÑÎÕÕû¸öÈí¼þµÄ¼Ü¹¹£¬Õë¶ÔÒ»¸öÐÐÒµµÄ¾ßÌåÒµÎñ£¬Äܹ»Éè¼ÆÒ»¸öºÏÀíµÄ¼Ü¹¹£¬Ìá¸ßÈí¼þµÄ¿É¿¿ÐÔ¡¢¿Éά»¤ÐÔ¡¢¿É¸´ÓÃÐÔ¡£¾ÍÏñһλ¾Ñé·á¸»µÄͬÊÂËùË ......
/////////////////////DogTestDrive/////////////////////
class DogTestDrive {
public static void main(String[] args) {
Dog one = new Dog();
one.size = 70;
Dog two = new Dog();
two.size = 8;
......
±¾ÎÄΪԴ´£¬ÈçÐèתÔØ£¬Çë×¢Ã÷×÷Õߺͳö´¦£¬Ð»Ð»£¡
Ëõ·ÅͼÏñµÄ»ù±¾ÔÀíÊÇ´´½¨Ò»¸öÄ¿±ê´óСµÄ»²¼£¬È»ºó¶ÁȡԴͼÏñ£¬²¢½«¸ÃͼÏñ»æÖÆÕâ¸ö»²¼ÉÏ¡£ÎªÁËʹ³ÌÐòͨÓã¬Ô´Í¼ÏñºÍËõ·ÅºóµÄÄ¿±êͼÏñÓ¦Ó÷ֱðʹÓà InputStreamºÍOutputStreamÀ´±íʾ£¬´úÂëÈçÏ£º
public stat ......
Òý£ºAndroid µÄAPIÖÐÓиö java.util.regex °ü£¬ÆäÖÐÓÐÁ½¸öÀ࣬һ¸ö½Ó¿ÚºÍÒ»¸öÒì³££º
Interfaces
MatchResult
Holds the results of a successful match of a Pattern against a given string.
Classes
Matcher
Provides a means of matching regular expressions against a given input,
finding occurrences of ......