java²¥·ÅwavµÄ»ù´¡´úÂë
import java.io.*;
public class TestMusic{
private AudioFormat format;
private byte[] samples;
public static void main(String args[])throws Exception{
TestMusic sound =new TestMusic("1.wav");
InputStream stream =new ByteArrayInputStream(sound.getSamples());
// play the sound
sound.play(stream);
// exit
System.exit(0);
}
public TestMusic(String filename) {
try {
// open the audio input stream
AudioInputStream stream =AudioSystem.getAudioInputStream(new File(filename));
format = stream.getFormat();
// get the audio samples
samples = getSamples(stream);
}
catch (UnsupportedAudioFileException ex) {
ex.printStackTrace();
}
catch (IOException ex) {
ex.printStackTrace();
}
}
public byte[] getSamples() {
return samples;
}
private byte[] getSamples(AudioInputStream audioStream) {
// get th
Ïà¹ØÎĵµ£º
½ñÌìѧϰÁËapplet²¼¾ÖÎÊÌ⣺
°´Å¥¡¢±êÇ©ÊÇÔõÑù¼ÓÈëµ½applet³ÌÐò(ÈÝÆ÷)µ±ÖÐÈ¥µÄÄØ£¿
ÐèÒªÓõ½²¼¾ÖÈÝÆ÷¹ÜÀíÆ÷(LayoutManager)£ºËüÓÃÓÚÐÖúÈÝÆ÷È·¶¨¼ÓÈëµÄ×é¼þ(°´Å¥µÈ)Ó¦¸Ã·ÅÖõÄλÖÃ
awtÌṩÁË4Öг£ÓõIJ¼¾ÖÈÝÆ÷¹ÜÀíÆ÷
>>FlowLayout
>>BorderLayout
>>GridLayout
>>CardLayout
appletĬÈÏÊ ......
ÒÔÇ°¿´¹ýÕâ±¾Ê飬×î½ü¾õµÃ×÷ÕßÓÐЩ¹Ûµã»¹ÊÇͦ¶ÔÁË£¬¼ÓÉÏЩ×Ô¼ºµÄ×ܽᣬÕûÀíÏ£¬Ï£ÍûÄܶÔÒÔºó¹¤×÷ѧϰÓÐÖ¸µ¼×÷Óá£
³ÌÐòÔ±µÄÈýÖÖ¾³½ç£º
¿ÉÄÜÍõ¹úά´ó¸ç¿´¿´ºóÈË°ÑËûµÄÈËÉúÈý¾³½ç·¢Õ¹µÃÈçºÎ¿çѧ¿Æ£¬¶àÃÅÀ࣬һ¶¨ÈªÏÂÓÐÖª£¬±¶¸ÐÐÀο°¡£¬¹þ¹þ£¡
1¡¢³ÌÐòÔ±µÚÒ»²ã¾³½ç£ºÕâ°ï¸çÃÇÒ»°ã¶¼ÊDZÏÒµÈýÄêÒÔÄڵģ¬±È½ÏÓо«Á¦£¬¶ ......
×î½ü×öspider£¬javaµÄÕýÔò±í´ïʽ½âÎö³öÿ¸öÍøÒ³µÄ³¬Á´½Ó£¬¸Ð¾õÕýÔòÕæµÄÉñͨ¹ã´ó£¡
´ó¸Å˵һÏ£¬ÎÒµÄͨ³£Ó÷¨¡£
ÕâÒ»²»Ö»ÊǽâÎö³ö <a href=""> Õⲿ·Ö
String regex = "(<a href=\")([\\S]+)(\")";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(sb); //sbÊÇÒ»¸öhtml ´ú ......
¹Ø¼ü×Ö: java·ÖÒ³´úÂëʵÀý
package com.hjf.web.view;
public class PageUtil ...{
private int pageSize;//ÿҳÏÔʾµÄÌõÊý
private int recordCount;//×ܹ²µÄÌõÊý
private int currentPage;//µ±Ç°Ò³Ãæ
publi ......
windows xpÏÂÅäÖÃJDK»·¾³±äÁ¿£º
1.°²×°JDK£¬°²×°¹ý³ÌÖпÉÒÔ×Ô¶¨Ò尲װĿ¼µÈÐÅÏ¢£¬ÀýÈçÎÒÃÇÑ¡Ôñ°²×°Ä¿Â¼ÎªD:\java\jdk1.5.0_08£»
2.°²×°Íê³Éºó£¬ÓÒ»÷“ÎҵĵçÄÔ”£¬µã»÷“ÊôÐÔ”£»
3.Ñ¡Ôñ“¸ß¼¶”Ñ¡Ï£¬µã»÷“»·¾³±äÁ¿”£»
&nb ......