abstract public int read(char cbuf[], int off, int len) throws IOException;//要重载之后才能调用!

解决方案 »

  1.   

    NATIVE的意义:Using the native keyword Making Java methods native is very easy. Below is a summary of the required steps: Delete the body of the method. Add a semicolon at the end of the method's signature. Add the native keyword at the beginning of the method's signature. Include the method's body in a native library to be loaded at runtime. For example, assume the following method exists in a Java class: public void nativeMethod () {
      //the method's body
    }
     This is how the method becomes native: public native void nativeMethod ();
     Now that you've declared the method to be native, its actual implementation will be included in a native library. It is the duty of the class, of which this method is a member, to invoke the library so its implementation becomes globally available. The easiest way to have the class invoke the library is to add the following to the class: static
    {
      System.loadLibrary (nameOfLibrary);
    }
     A static code block is always executed once when the class is first loaded. You can include virtually anything in a static code block. However, loading libraries is the most common use for it. If, for some reason, the library fails to load, an UnsatisfiedLineError exception will be thrown once a method from that library is called. The JVM will add the correct extension to its name (.dll in Windows, and .so in UNIX) -- you don't have to specify it in the library name.
      

  2.   

    strictfp :(proposed) Method or class to use standard precision in floating-point intermediate calculations.
      

  3.   

    2. 接口Serializable是一个标志借口,所以没有任何内容,表明继承此接口的类的对象可以序列化,可以直接读写,类似的借口还有java.rmi.Remote,标志远程调用
      

  4.   

    也就是说native里面所定义的方法在jvm中会受到特殊待遇啰?
    其方法的body部分在哪个library中定义--library不就是jdk吗??难道#%^&%&
      

  5.   

    Method or class to use standard precision in floating-point intermediate calculations
    在浮点中间运算中,用标准精确的方法和类????^*&(%($
    晕--英语学得太差,谁能解释一下?!!!