<dfn id="is4kg"></dfn>
  • <ul id="is4kg"></ul>
  • <abbr id="is4kg"></abbr>
  • <ul id="is4kg"></ul>
    <bdo id="is4kg"></bdo>
    以文本方式查看主題

    -  曙海教育集團(tuán)論壇  (http://www.hufushizhe.com/bbs/index.asp)
    --  JAVA語言開發(fā)  (http://www.hufushizhe.com/bbs/list.asp?boardid=64)
    ----  用java語言實現(xiàn)的迷你型的http服務(wù)器代碼  (http://www.hufushizhe.com/bbs/dispbbs.asp?boardid=64&id=2487)

    --  作者:wangxinxin
    --  發(fā)布時間:2010-12-11 10:16:36
    --  用java語言實現(xiàn)的迷你型的http服務(wù)器代碼
    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.
        

    主站蜘蛛池模板: 精品哟哟哟国产在线观看不卡| 丰满老熟妇好大bbbbb| 精品一区二区三区波多野结衣 | 精东传媒国产app| 国产欧美日韩视频在线观看| 一本到在线观看视频| 日日操夜夜操天天操| 亚洲精品无码av人在线观看| 精品国产一区二区三区不卡| 国产成人女人在线视频观看| 99视频有精品视频免费观看| 抽搐一进一出在深一点| 免费观看激色视频网站bd| 香焦视频在线观看黄| 国内精品视频在线观看| 中文字幕38页| 日本一道高清一区二区三区| 亚洲国产高清美女在线观看| 狠狠人妻久久久久久综合蜜桃| 国产做a爰片久久毛片| 2021天天干| 成人在线综合网| 亚洲av第一网站久章草| 欧美日韩在线视频一区| 免费黄色软件下载| 美国式禁忌矿桥矿网第11集| 国产护士一区二区三区| 三个黑人上我一个经过| 日本免费成人网| 亚洲午夜精品国产电影在线观看| 法国性XXXXX极品| 午夜精品乱人伦小说区| 老熟女高潮一区二区三区| 国产欧美日韩精品丝袜高跟鞋| h视频在线观看免费| 工囗番漫画全彩无遮拦大全| 久久亚洲国产伦理| 日本肉体裸交xxxxbbbb| 免费**毛片在线播放视| 精品亚洲国产成人| 国产真实伦正在播放|