Java nio Òì²½Ì×½Ó×Ö
import java.nio.*;
import java.nio.channel.*;
import java.io.*;
public static void copy(File source, File dest) throws IOException {
FileChannel in = null, out = null;
try {
in = new FileInputStream(source).getChannel();
out = new FileOutputStream(dest).getChannel();
long size = in.size();
MappedByteBuffer buf = in.map(FileChannel.MapMode.READ_ONLY, 0, size);
out.write(buf);
if (in != null) in.close();
if (out != null) out.close();
}
}
import java.nio.*; import java.nio.channel.*; import java.io.*; public static void copy(File source, File dest) throws IOException { FileChannel in = null, out = null; try { in = new FileInputStream(source).getChannel(); out = new FileOutputStream(dest).getChannel(); long size = in.size(); MappedByteBuffer buf = in.map(FileChannel.MapMode.READ_ONLY, 0, size); out.write(buf); if (in != null) in.close(); if (out != null) out.close(); } }
̸̸MappedByteBuffer
JDK1.4ÖмÓÈëÁËÒ»¸öеİü:NIO(java.nio.*).Õâ¸ö¿â×î´óµÄ¹¦ÄܾÍÊÇÔö¼ÓÁ˶ÔÒì²½Ì×½Ó×ÖµÄÖ§³Ö.
ÆäʵÔÚÆäËûÓïÑÔÖÐ,°üÀ¨ÔÚ×îÔʼµÄSOCKETʵÏÖ(BSD SOCKET),ÕâÊÇÒ»¸öÔçÓеŦÄÜ:Òì²½»Øµ÷¶Á/дʼþ,
ͨ¹ýÑ¡ÔñÆ÷¶¯Ì¬Ñ¡Ôñ¸ÐÐËȤµÄʼþ,µÈµÈ.²»¹ýºÃÔÚSUNÖÕÓÚÒ²¿ªÊ¼Ö§³ÖËüÁË.
ÎÒÏëÕâÒ²ÊÇ¿ª·ÅµÄºÃ´¦Ö®Ò»°É(NIOÊÇ×÷ΪJSR-51ÏîÄ¿ÒýÈëµÄ).
ÕâÀï¼òµ¥½²Ò»Ï²Ù×÷Á÷³Ì:
ͨ¹ý°ÑÒ»¸öÌ×½Ó×ÖͨµÀ(SocketChannel)×¢²áµ½Ò»¸öÑ¡ÔñÆ÷(Selector)ÖÐ,²»Ê±µ÷ÓúóÕßµÄÑ¡Ôñ(select)·½·¨¾ÍÄÜ·µ»Ø
Âú×ãµÄÑ¡Ôñ¼ü(SelectionKey),¼üÖаüº¬ÁËSOCKETʼþÐÅÏ¢.
Òì²½Ì×½Ó×Ö¶Ô·þÎñÆ÷³ÌÐòÀ´Ëµ¸ü¾
Ïà¹ØÎĵµ£º
Ôڳɹ¦ÊµÏÖJavaµ÷ÓÃC++Ö®ºó£¬½ÓÏÂÀ´Ïëµ½ÄÜ·ñͨ¹ýJNAʵÏÖJavaµ÷ÓÃFortran£¬½ñÌìÊÔÑéÁËһϣ¬»¹ÊDZȽÏÈÝÒ׵ġ£
ÍøÉÏÓÐÒ»¸öJavaµ÷ÓÃF95µÄÀý×Ó£¬µ«ÊÇÎÒ¿¼ÂDz»½öҪʵÏÖF95µÄµ÷Ó㬻¹ÒªÊµÏÖF77µÄµ÷Óã¬ËùÒÔ·ÑÁËһЩÖÜÕÛ¡£
ÎÊÌâµÄ¹Ø¼üÔÚÓÚF77Ϊ¹ý³ÌÃû×Ô¶¯Ìí¼ÓÁËÒ»¸öβ²¿µÄÏ»®Ïߣ¬ËùÒÔsub1Õâ¸ö¹ý³Ì£¬µ½JavaÒ»¶Ë£¬¾Í±ä³ÉÁËsub1_£¬ ......
2008 Äê 6 ÔÂ 24 ÈÕ
ÔÎĵØÖ·£º http://www.ibm.com/developerworks/cn/data/library/techarticles/dm-0806wangys/
±¾ÎĽéÉÜ IBM FileNet P8 4.0 Platform ÌṩµÄ Content Java API¡£Ê×ÏÈ¶Ô FileNet P8 Content Engine ºÍ API ½øÐиÅÒª½éÉÜ, ²¢ËµÃ÷ÁËһЩ»ù±¾¸ÅÄËæºóÏêϸ½éÉÜÁË FileNet Content EngineÌṩµÄ»ùÓÚ EJB ......
1.j2ee
http://0444.xue8xue8.com/computer/program/java/j2eeshuren/00.wmv
http://0444.xue8xue8.com/computer/program/java/j2eeshuren/01.wmv
http://0444.xue8xue8.com/computer/program/java/j2eeshuren/02.wmv
http://0444.xue8xue8.com/computer/program/java/j2eeshuren/03.wmv
http://0444.xue8xue8.com/c ......
ÏÂÃæ²Î¿¼±ðÈ˵ÄÎÄÕºÍ×Ô¼ºµÄÒ»µã¸Ä¶¯ºÍ×ܽᲢ¼ÓÒÔ×¢ÊÍ
JAVA·´Éä»úÖÆÖ÷ÒªÌṩÁËÒÔϹ¦ÄÜ£º
1.ÔÚÔËÐÐʱÅжÏÈÎÒâÒ»¸ö¶ÔÏóËùÊôµÄÀà¡£
2.ÔÚÔËÐÐʱ¹¹ÔìÈÎÒâÒ»¸öÀàµÄ¶ÔÏó¡£
3.ÔÚÔËÐÐʱÅжÏÈÎÒâÒ»¸öÀàËù¾ßÓеijÉÔ±±äÁ¿ºÍ ......