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

Rss & SiteMap

曙海教育集團論壇 http://www.bjzhda.cn

曙海教育集團論壇
共1 條記錄, 每頁顯示 10 條, 頁簽: [1]
[瀏覽完整版]

標題:用java語言實現的迷你型的http服務器代碼

1樓
wangxinxin 發表于:2010-12-11 10:16:36
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.
    
共1 條記錄, 每頁顯示 10 條, 頁簽: [1]

Copyright © 2000 - 2009 曙海教育集團
Powered By 曙海教育集團 Version 2.2
Processed in .03320 s, 2 queries.
主站蜘蛛池模板: 狠狠躁日日躁夜夜躁A片小说按摩 | 影音先锋资源av | 国产成人午夜精品5599 | 欧美综合自拍亚洲综合百度 | 精品a在线观看 | 色婷婷电影 | 日韩在线免费电影 | 99九九精品| 亚洲欧美日韩三级 | 黄色aaa视频 | 国产视频一区二区 | 电影长安道无删减免费看 | 日韩精品一区二区三区在线播放 | 国产四虎精品8848hh | 久久久www成人免费无遮挡大片 | 91高清国产视频 | 欧美一级成人免费大片 | 午夜小视频免费观看 | 日本亚洲精品色婷婷在线影院 | 亚洲精品国产精品国自产在线 | 国产精品不卡 | 色在线观看视频 | 国产成人精品久久二区二区 | 成人免费一区二区三区视频网站 | 国产成人在线视频 | 亚洲欧美国产日产综合不卡 | 国产女人成人精品视频 | 久久精品成人 | 精品一区中文字幕 | 亚洲视频毛片 | 免费无遮挡很爽很污很黄 | 欧美成年性h版影视中文字幕 | 偷拍亚洲制服另类无码专区 | 免费三级大片 | 波多野结衣三区 | 亚洲天堂久久 | 国产精品亚洲精品日韩已方 | 中文字幕一区二区三区四区五区 | 上将的炮灰前妻重生了 | 日本午夜视频 | 国产亚洲欧美日韩v在线 |