javaʵÏÖ×ÊÔ´ÏÂÔØ
/Download by HTTP
//For other protocol, do it yourself
import java.net.*;
import java.io.*;
public class DonwLoad
{
public static void main(String args[])
{
DonwLoad dl =new DonwLoad();
String downfile ="http://www.google.cn/music/top100/url?q=http%3A%2F%2Ffile15.top100.cn%2F201003041353%2FF587B34724657ABBF8CBA990E1C82837%2FSpecial_309548%2F%25E5%258B%2587%25E6%2595%25A2%25E7%2588%25B1.mp3&ct=rdl&cad=dl&ei=2EqPS5jgB4easQLM3920Ag&sig=C56A17F31A0C9FA8BBF93E7ED1AFA8C2"; // can be any file type! Not only htm files can be downloaded.
String saveplace ="c:\\test111.mp3"; //´æ´¢Â·¾¶
if(dl.downLoadFile(downfile,saveplace))
System.out.println("Download ok");
}
public boolean downLoadFile(String fileurl, String savepath)
{
try
{
URL url =new URL(fileurl); //
Ïà¹ØÎĵµ£º
°æÈ¨ÉùÃ÷£º×ªÔØÊ±ÇëÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕÂÔʼ³ö´¦ºÍ×÷ÕßÐÅÏ¢¼°±¾ÉùÃ÷
http://as112255.blogbus.com/logs/38662785.html
package com.softeem.jbs.lesson4;
import java.util.Random;
/**
* ÅÅÐò²âÊÔÀà
*
* ÅÅÐòËã·¨µÄ·ÖÀàÈçÏ£º
* 1.²åÈëÅÅÐò£¨Ö±½Ó²åÈëÅÅÐò¡¢ÕÛ°ë²åÈëÅÅÐ ......
JavaỊ̈߳º²¢·¢Ð×÷-Éú²úÕßÏû·ÑÕßÄ£ÐÍ
¶ÔÓÚ¶àÏ̳߳ÌÐòÀ´Ëµ£¬²»¹ÜÈκαà³ÌÓïÑÔ£¬Éú²úÕߺÍÏû·ÑÕßÄ£ÐͶ¼ÊÇ×î¾µäµÄ¡£¾ÍÏñѧϰÿһÃűà³ÌÓïÑÔÒ»Ñù£¬Hello World£¡¶¼ÊÇ×î¾µäµÄÀý×Ó¡£
ʵ¼ÊÉÏ£¬×¼È·ËµÓ¦¸ÃÊÇ¡°Éú²úÕß-Ïû·ÑÕß-²Ö´¢¡±Ä£ÐÍ£¬À뿪Á˲ִ¢£¬Éú²úÕßÏû·ÑÕßÄ£Ð;ÍÏÔµÃûÓÐ˵·þÁ¦ÁË¡£
¶ÔÓÚ´ËÄ£ÐÍ£¬Ó¦¸ÃÃ÷ȷһϼ¸µã£º ......
JavaÊý¾ÝÀàÐÍ
HibernateÊý¾ÝÀàÐÍ
±ê×¼SQLÊý¾ÝÀàÐÍ
(PS:¶ÔÓÚ²»Í¬µÄDB¿ÉÄÜÓÐËù²îÒì)
byte¡¢java.lang.Byte
byte
TINYINT
short¡¢java.lang.Short
short
SMALLINT
int¡¢java.lang.Integer
integer
INGEGER
long¡¢java.lang.Long
long
BIGINT
float¡¢java.lang.Float
float
FLOAT
double¡¢java.lang.Doubl ......
/**
* Õâ¶Î³ÌÐò²¢²»ÄÑ£¬Ó¦¸ÃºÜºÃ¿´¶®£¬ÎҰѹý³Ì´óÖ½²Ò»Ï£¬Ê×ÏÈÄãµÄÄÔ×ÓÀïÏȸ¡ÏÖÒ»¸öÊý×éºÍÈý¸öÖ¸Õ룬
* µÚÒ»¸öÖ¸Õë³ÆÎªpÖ¸Õ룬ÔÚÕû¸ö¹ý³Ì½áÊøÖ®Ç°ËüÀÎÀεÄÖ¸ÏòµÚÒ»¸öÊý£¬µÚ¶þ¸öÖ¸ÕëºÍµÚÈý¸öÖ¸Õë·Ö±ðΪloÖ¸ÕëºÍhiÖ¸Õ룬
* ·Ö±ðÖ¸Ïò×î×ó±ßµÄÖµºÍ×îÓұߵÄÖµ¡£loÖ¸ÕëºÍhiÖ¸Õë´ÓÁ½±ßͬ ......
Ò»¡¢¶àÖÖ·½Ê½¶ÁÎļþÄÚÈÝ¡£
1¡¢°´×Ö½Ú¶ÁÈ¡ÎļþÄÚÈÝ
2¡¢°´×Ö·û¶ÁÈ¡ÎļþÄÚÈÝ
3¡¢°´ÐжÁÈ¡ÎļþÄÚÈÝ
4¡¢Ëæ»ú¶ÁÈ¡ÎļþÄÚÈÝ
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java ......