成人免费一级片_国产一区导航_av资源在线免费观看_91黄色免费视频_亚洲欧美日韩色_91国产精品一区

以文本方式查看主題

-  曙海教育集團論壇  (http://www.usoyyii.cn/bbs/index.asp)
--  JAVA語言開發  (http://www.usoyyii.cn/bbs/list.asp?boardid=64)
----  用java語言實現的迷你型的http服務器代碼  (http://www.usoyyii.cn/bbs/dispbbs.asp?boardid=64&id=2487)

--  作者:wangxinxin
--  發布時間:2010-12-11 10:16:36
--  用java語言實現的迷你型的http服務器代碼
package  positron.harness;

import  java.io.BufferedReader;
import  java.io.ByteArrayInputStream;
import  java.io.File;
import  java.io.FileInputStream;
import  java.io.IOException;
import  java.io.InputStream;
import  java.io.InputStreamReader;
import  java.io.OutputStream;
import  java.io.PrintWriter;
import  java.io.UnsupportedEncodingException;
import  java.net.ServerSocket;
import  java.net.Socket;
import  java.net.URLEncoder;
import  java.util.Date;
import  java.util.Enumeration;
import  java.util.HashMap;
import  java.util.Locale;
import  java.util.Map;
import  java.util.Properties;
import  java.util.StringTokenizer;
import  java.util.TimeZone;

/**
 * A simple, tiny, nicely embeddable HTTP 1.0 server in Java
 *
 * This class has been trivially modified from its original form, taken from
 * 
http://elonen.iki.fi/code/nanohttpd/NanoHTTPD.java
 *
 * <p> NanoHTTPD version 1.1,
 * Copyright &copy; 2001,2005-2007 Jarno Elonen (elonen@iki.fi, 
http://iki.fi/elonen/ )
 *
 * <p><b>Features + limitations: </b><ul>
 *
 *    <li> Only one Java file </li>
 *    <li> Java 1.1 compatible </li>
 *    <li> Released as open source, Modified BSD licence </li>
 *    <li> No fixed config files, logging, authorization etc. (Implement yourself if you need them.) </li>
 *    <li> Supports parameter parsing of GET and POST methods </li>
 *    <li> Supports both dynamic content and file serving </li>
 *    <li> Never caches anything </li>
 *    <li> Doesn\'t limit bandwidth, request time or simultaneous connections </li>
 *    <li> Default code serves files and shows all HTTP parameters and headers</li>
 *    <li> File server supports directory listing, index.html and index.htm </li>
 *    <li> File server does the 301 redirection trick for directories without \'/\'</li>
 *    <li> File server supports simple skipping for files (continue download) </li>
 *    <li> File server uses current directory as a web root </li>
 *    <li> File server serves also very long files without memory overhead </li>
 *    <li> Contains a built-in list of most common mime types </li>
 *    <li> All header names are converted lowercase so they don\'t vary between browsers/clients </li>
 *
 * </ul>
 *
 * <p><b>Ways to use: </b><ul>
 *
 *    <li> Run as a standalone app, serves files from current directory and shows requests</li>
 *    <li> Subclass serve() and embed to your own program </li>
 *    <li> Call serveFile() from serve() with your own base directory </li>
 *
 * </ul>
 *
 * See the end of the source file for distribution license
 * (Modified BSD licence)
 
*/
public   class  NanoHTTPD
{
    
//  ==================================================
    
//  API parts
    
//  ==================================================

    
/**
     * Override this to customize the server.<p>
     *
     * (By default, this delegates to serveFile() and allows directory listing.)
     *
     * @parm uri    Percent-decoded URI without parameters, for example "/index.cgi"
     * @parm method    "GET", "POST" etc.
    

主站蜘蛛池模板: 国产精品a级 | 麻豆av网 | 九九精品影院 | 五月婷婷综合色 | 波多野结衣亚洲 | 欧美丰满老妇 | 亚洲色图另类小说 | 在线精品亚洲欧美日韩国产 | 久久久久久久久久久久久久 | 天天干天天操天天射 | 中文字幕视频免费 | 色综合天天综合网天天狠天天 | 午夜精品一区二区三区在线播放 | 国产精品自拍区 | 天天操天天干天天爽 | 国产原创在线观看 | 国产精品福利在线播放 | 亚洲理论片 | 香蕉视频官方 | 国产精品美女网站 | 日韩视频一区 | 日韩在线91| 欧美一区二区三区不卡 | 亚洲成人av一区二区三区 | 中文字幕在线免费观看 | 亚洲a毛片 | 最新国产精品 | 成人三级视频在线观看 | 午夜青青草 | 久久久一区二区三区四区 | 中文字幕网站在线观看 | 超碰97在线资源 | 国产精品久久91 | 91高清网站| 国产日本在线观看 | 日本久久网站 | 国产一区二区 | 欧美精品一二 | 极品少妇xxxx精品少妇偷拍 | 日韩中文字幕影院 | 91国内在线 |