在线中文-在线在线ccc66-在线永久免费观看的毛片-在线永久免费观看的a站视频-久久精品最新免费国产成人-久久精品综合一区二区三区

以文本方式查看主題

-  曙海教育集團論壇  (http://www.bgl88.cn/bbs/index.asp)
--  JAVA語言開發  (http://www.bgl88.cn/bbs/list.asp?boardid=64)
----  用java語言實現的迷你型的http服務器代碼  (http://www.bgl88.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.
    

主站蜘蛛池模板: 久久毛片免费 | 羞羞网站在线播放 | 中文字幕日本久久2019 | 国产一区二区三区日韩欧美 | 亚洲人成一区二区不卡 | 亚洲午夜久久久久久91 | 亚洲国产成人久久一区二区三区 | 亚洲国产成人精品一区二区三区 | 亚洲图片在线视频 | 选择影院在线观看 | 在线播放国产一区二区三区 | 免费观看的美女视频网站 | 亚洲欧美在线视频观看 | 小姐电影国语版免费观看 | 日韩在线观看精品 | 最新的国产成人精品2022 | 亚洲欧美一区二区三区久久 | 久久精品国波多野结衣 | 四虎在线最新永久免费播放 | 91久久精品一区二区 | 最近电影免费观看在线 | 亚洲国产精品成人综合久久久 | 亚洲天码中文字幕第一页 | 国产欧美一区二区久久 | 手机免费在线视频 | 激情婷婷丁香 | 亚洲欧美一区二区三区在线播放 | 欧美黄色大片在线观看 | 最近中文字幕完整版视频在线看 | 色就干 | 久久久一本精品99久久精品66 | 亚洲综合色丁香婷婷六月图片 | 一级电影在线播放 | 九色视频网站 | 婷婷爱五月天 | 亚洲视频成人 | 日本在线观看一区 | 欧美区国产区 | 中文字幕ⅴ亚洲日本在线电影 | 中文国产成人精品少久久 | 欧美五月激情 |