Code example for FileChannel

Methods: close

0
     * ¹Ø±ÕÎļþ 
     *  
     * @throws IOException 
     */ 
    void close() throws IOException { 
        this.fc.close();
    } 
 
 
    /** 
     * ´ÓÎļþ¶ÁÈ¡Êý¾Ýµ½bf£¬Ö±µ½¶ÁÂú»òÕ߶Áµ½Îļþ½áβ¡£ <br /> 
     * ÎļþµÄÖ¸Õë»áÏòºóÒƶ¯bfµÄ´óС 
     *  
     * @param bf 
     * @throws IOException 
     */ 
    void read(final ByteBuffer bf) throws IOException {
        while (bf.hasRemaining()) {
            final int l = this.fc.read(bf);
            if (l < 0) {
                break;