波多在线播放_激情深爱五月_久久欧美精品_成人超碰_国产久_www.pixiv.moe

以文本方式查看主題

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

主站蜘蛛池模板: 久久一级 | 国产在线精品一区二区三区 | 亚洲精品乱码久久久久久蜜桃91 | 国产精品久久久久久久午夜 | 五月婷综合| 三级免费网址 | 国产精品亚洲综合一区在线观看 | 欧美激情久久久 | 国产亚洲精品一区二区 | 男人天堂中文字幕 | 久久草在线视频国产一 | 日本黄色福利视频 | 日韩精品www| 国产亚洲第一伦理第一区 | 一级一级毛片免费看 | 中文字幕在线播放 | 欧美韩国日本一区 | 精品欧美一区二区久久久伦 | 99热这里有免费国内精品 | 精品无人乱码一区二区三区 | 欧美激情日韩 | 97婷婷色| 9277在线观看视频 | 日韩欧美色综合 | 国产成人一区二区三区 | 欧美成人a∨高清免费观看 久久亚洲欧美日韩精品专区 | 99人中文字幕亚洲区 | 亚洲色图国产 | 亚洲精品亚洲人成人网 | 91最新视频 | 丝袜偷窥亚洲综合 | 性69式视频在线观看免费 | 亚洲第一区视频在线观看 | 久久亚洲精品中文字幕 | 国产精品视频播放 | 久久国产欧美日韩精品 | 一区二区三区国产精品 | 亚洲欧美中文字幕 | 欧美高清一区二区三区欧美 | 日韩一区二区在线视频 | 99久久99久久精品免费看蜜桃 |