Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

oracleµ÷ÓÃjava·½·¨µÄÀý×Ó

ÔÚoracleÖе÷ÓÃjava³ÌÐò,×¢Òâ:java·½·¨±ØÐëÊÇstaticÀàÐ͵Ä,Èç¹ûÏëÔÚJAVAÖÐʹÓÃsystem.out/errÊä³ölog.
ÐèÒªÔÚoracle ÖÐÖ´ÐÐ"call dbms_java.set_output(5000);".
Ò»¡¢helloWord
1 ±àдJAVA³ÌÐò,Ò²ÊÇÔÚSQL/PLUSÖÐд,²¢Ö´ÐÐ.
create or replace and compile java source named hello as
public     class   Hello    {
         static    public    String Message(String name)    {
            return     " Hello,   "    +    name;
        }
}
/
2 ·¢²¼JAVA³ÌÐò
create or replace function hello (name VARCHAR2 )   return    VARCHAR2
      as language java name
       ' Hello.Message (java.lang.String) return java.lang.String ' ;
/
3 ʹÓ÷¢ÃæµÄJAVA³ÌÐò
select hello( ' world! ' ) from dual;
HELLO( ' world! ' )
-- -------------
Hello world!
    
¶þ¡¢ÔÚJAVA³ÌÐòÖÐʹÓÃSQL
1 ±àдJAVA³ÌÐò
create or replace and compile java source named test as
import java.sql. * ;
import java. text .DateFormat;
import java. text .SimpleDateFormat;
import java.util. * ;
import java.util.Date;
import com.ccit.wcsmp.comm.vo.daovo.MBTResultVO;
import oracle.sql.ARRAY;
import oracle.sql.ArrayDescriptor;
public class Test
{
   static public String   message(String name) {
        String sql = " select sysdate as dd from dual";
        String tmpStr = null ;
        PreparedStatement pstmt = null ;
        ResultSet rs = null ;
        Connection conn = null ;
         try
 


Ïà¹ØÎĵµ£º

oracle ±í¿Õ¼ä²Ù×÷

oracle±í¿Õ¼ä²Ù×÷Ïê½â
  1
  2
  3×÷Õߣº   À´Ô´£º    ¸üÐÂÈÕÆÚ£º2006-01-04 
  5
  6 
  7½¨Á¢±í¿Õ¼ä
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

java nio Ö®MappedByteBuffer

 
ÆäʵÕÆÎÕ
MappedByteBuffer
²¢²»ÄÑ£¬Ö»Òª¼Çס“Èý·½Èý·¨ÈýÌØÐÔ”£¨ÎÒ×Ô¼º×ܽáµÄ£¬ºÇºÇ
~~
²»ÒªÈÓ¼¦µ°Å¶¡£¡£¡££©Õâ¾ä»°¾Í¿ÉÒÔÇáËɸ㶨£¡
MappedByteBuffer
Ö»ÊÇÒ»ÖÖÌØÊâµÄ
ByteBuffer
£¬¼´ÊÇ
ByteBuffer
µÄ×ÓÀà¡£
MappedByteBuffer
½«ÎļþÖ±½ÓÓ³Éäµ½Äڴ棨ÕâÀïµÄÄÚ´æÖ¸µÄÊÇÐéÄâÄڴ棬²¢² ......

ʹÓÃJava·¢ËÍPOST¡¢GETÇëÇó

 Ê¹ÓÃJava·¢ËÍGET¡¢POSTÇëÇó
——½ÚÑ¡×Ô¡¶·è¿ñJava½²Òå¡·
URLµÄopenConnection()·½·¨½«·µ»ØÒ»¸öURLConnection¶ÔÏ󣬸öÔÏó±íʾӦÓóÌÐòºÍ URL Ö®¼äµÄͨÐÅÁ´½Ó¡£³ÌÐò¿ÉÒÔͨ¹ýURLConnectionʵÀýÏò¸ÃURL·¢ËÍÇëÇ󡢶ÁÈ¡URLÒýÓõÄ×ÊÔ´¡£
ͨ³£´´½¨Ò»¸öºÍ URL µÄÁ¬½Ó£¬²¢·¢ËÍÇëÇ󡢶ÁÈ¡´Ë URL ÒýÓõÄ×ÊÔ´ÐèÒªÈçÏ ......

ʵսJava¶àÏ̱߳à³Ì²»Ìᳫ×ö·¨

²»ÌᳫʹÓõķ½·¨ÊÇΪ֧³ÖÏòºó¼æÈÝÐÔ¶ø±£ÁôµÄÄÇЩ·½·¨£¬ËüÃÇÔÚÒÔºóµÄ°æ±¾ÖпÉÄܳöÏÖ£¬Ò²¿ÉÄܲ»³öÏÖ¡£Java ¶àÏß³ÌÖ§³ÖÔÚ°æ±¾ 1.1 ºÍ°æ±¾ 1.2 ÖÐ×öÁËÖØ´óÐÞ¶©£¬stop()¡¢suspend() ºÍ resume() º¯ÊýÒѲ»ÌᳫʹÓá£ÕâЩº¯ÊýÔÚ JVM ÖпÉÄÜÒýÈë΢ÃîµÄ´íÎó¡£ËäÈ»º¯ÊýÃû¿ÉÄÜÌýÆðÀ´ºÜÓÕÈË£¬µ«ÇëµÖÖÆÓÕ»ó²»ÒªÊ¹ÓÃËüÃÇ¡£
µ÷ÊÔÏ̻߳¯µÄ ......

Java¶ÁÎļþдÎļþ²Ù×÷

  ÕâÀJavaµÄ¶ÁÎļþºÍдÎļþ¶¼ÊÇ»ùÓÚ×Ö·ûÁ÷µÄ£¬Ö÷ÒªÓõ½ÏÂÃæµÄ¼¸¸öÀࣺ
1¡¢FileReader----¶ÁÈ¡×Ö·ûÁ÷
2¡¢FileWriter----дÈë×Ö·ûÁ÷
3¡¢BufferedReader----»º³åÖ¸¶¨ÎļþµÄÊäÈë
¸ÃÀàµÄ·½·¨ÓУº
void close() 
        ¹Ø±Õ¸ÃÁ÷¡£
 void mark(int readAhead ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ