亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? wapcodepagetest.java

?? jwap 協議 udp 可以用于手機通訊
?? JAVA
字號:
/** * JWAP - A Java Implementation of the WAP Protocols * Copyright (C) 2001-2004 Niko Bender * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */package net.sourceforge.jwap.wsp.header;import java.io.IOException;import junit.framework.TestCase;/** * jUnit test-cases for the WAP codepage */public class WAPCodePageTest extends TestCase {    WAPCodePage cp;    public WAPCodePageTest(String name) {        super(name);    }    public void testAccept() throws HeaderParseException {        byte[] hdr = cp.encode("Accept", "application/vnd.wap.wmlc");        assertEquals(new byte[] { (byte) 0x80, (byte) 0x94 }, hdr);    }    public void testAcceptLanguage() throws HeaderParseException {        byte[] hdr = cp.encode("Accept-Language", "en;q=0.7");        assertEquals(new byte[] { (byte) 0x83, 0x02, (byte) 0x99, 0x47 }, hdr);        hdr = cp.encode("Accept-Language", "en,sv");        assertEquals(new byte[] {                (byte) 0x83, (byte) 0x99, (byte) 0x83, (byte) 0xF0            }, hdr);    }    public void testAcceptCharset() throws HeaderParseException {        byte[] hdr = cp.encode("Accept-Charset", "UTF-8;q=0.7");        assertEquals(new byte[] { (byte) 0x81, 0x02, (byte) 0xea, 0x47 }, hdr);    }    public void testAcceptRanges() throws HeaderParseException {        // TODO: complete testcase        byte[] hdr = cp.encode("Accept-Ranges", "bytes");        hdr = cp.encode("Accept-Ranges", "none");    }    public void testConnection() throws HeaderParseException, IOException {        byte[] hdr = cp.encode("Connection", "Close");        assertEquals(new byte[] { (byte) 0x89, (byte) 0x80 }, hdr);        hdr = cp.encode("Connection", "keep-alive");        assertEquals(new byte[] {                (byte) 0x89, 'k', 'e', 'e', 'p', '-', 'a', 'l', 'i', 'v', 'e', 0            }, hdr);    }    public void testCacheControl()     {        byte[] hdr = cp.encode("cache-control", "no-cache");        assertEquals(new byte[] {(byte) 0x88, (byte) 128}, hdr);        hdr = cp.encode("cache-control", "no-store");        assertEquals(new byte[] {(byte) 0x88, (byte) 129}, hdr);        hdr = cp.encode("cache-control", "public");        assertEquals(new byte[] {(byte) 0x88, (byte) 134}, hdr);        hdr = cp.encode("cache-control", "private");        assertEquals(new byte[] {(byte) 0x88, (byte) 135}, hdr);        hdr = cp.encode("cache-control", "no-transform");        assertEquals(new byte[] {(byte) 0x88, (byte) 136}, hdr);        hdr = cp.encode("cache-control", "must-revalidate");        assertEquals(new byte[] {(byte) 0x88, (byte) 137}, hdr);        hdr = cp.encode("cache-control", "proxy-revalidate");        assertEquals(new byte[] {(byte) 0x88, (byte) 138}, hdr);    }        public void testContentDisposition() throws HeaderParseException {        byte[] hdr = cp.encode("Content-Disposition", "form-data");        assertEquals(new byte[] { (byte) 0xae, (byte) 0x01, (byte) 128 }, hdr);        hdr = cp.encode("Content-Disposition", "Attachment");        assertEquals(new byte[] { (byte) 0xae, (byte) 0x01, (byte) 129 }, hdr);        hdr = cp.encode("Content-Disposition", "Inline");        assertEquals(new byte[] { (byte) 0xae, (byte) 0x01, (byte) 130 }, hdr);        hdr = cp.encode("Content-Disposition", "UNK");        assertEquals(new byte[] { (byte) 0xae, 4, 'U', 'N', 'K', 0 }, hdr);    }    public void testDecodeServer() throws HeaderParseException, IOException     {        byte[] data = new byte[]{ (byte) 0xa6, 'A','p','a','c','h','e','/','1','.','3','.','2','9',0};        Header hdr = cp.decode(data);        assertNotNull(hdr);        assertEquals("Server", hdr.getName());        assertEquals("Apache/1.3.29", hdr.getValue());    }        public void testDecodeContentLength() throws HeaderParseException, IOException    {        byte[] data = new byte[]{(byte) 0x8d,0x02,0x02,(byte) 0xce};           Header hdr = cp.decode(data);        assertNotNull(hdr);        assertEquals("content-length", hdr.getName().toLowerCase());        assertEquals("718", hdr.getValue());    }        public void testDecodeDate() throws HeaderParseException, IOException    {        byte[] data = new byte[]{(byte) 0x92,0x04, 0x40, (byte) 0x97, (byte) 0xa9, 0x5b};            Header hdr = cp.decode(data);        assertNotNull(hdr);        assertEquals("Date", hdr.getName());        assertTrue(hdr.getValue().toString().startsWith("Tue, 4 May 2004 16:31:55"));    }        public void testDecodeContentType() throws HeaderParseException, IOException    {      byte[] data = cp.encode("Content-Type", "text/html");      Header hdr = cp.decode(data);      assertNotNull(hdr);      assertEquals("Content-Type", hdr.getName());      assertEquals("text/html", hdr.getValue());            data = cp.encode("Content-Type", "application/unknown");      hdr = cp.decode(data);      assertNotNull(hdr);      assertEquals("Content-Type", hdr.getName());      assertEquals("application/unknown", hdr.getValue());      data = cp.encode("Content-Type", "text/html; Charset=ISO-8859-4");      hdr = cp.decode(data);      assertNotNull(hdr);      assertEquals("Content-Type", hdr.getName());      assertEquals("text/html; Charset=ISO-8859-4", hdr.getValue());      data = cp.encode("Content-Type","");      hdr = cp.decode(data);      assertEquals("Content-Type", hdr.getName());      assertEquals("",hdr.getValue());    }        public void testDecodeConnection() throws HeaderParseException, IOException {        byte[] data = cp.encode("Connection", "close");        Header hdr = cp.decode(data);        assertNotNull(hdr);        assertEquals("Connection", hdr.getName());        assertEquals("CLOSE", hdr.getValue());        data = cp.encode("connection", "keep-alive");        hdr = cp.decode(data);        assertNotNull(hdr);        assertEquals("Connection", hdr.getName());        assertEquals("keep-alive", hdr.getValue());    }        public void setUp() throws IOException {        cp = WAPCodePage.getInstance();    }    private static void assertEquals(byte[] b1, byte[] b2) {        String s1 = null;        String s2 = null;        if (b1 != null) {            StringBuffer sb = new StringBuffer();            for (int i = 0; i < b1.length; i++) {                String h = Integer.toHexString(b1[i] & 0xff);                if (h.length() < 2) {                    sb.append("0");                }                sb.append(h).append(" ");            }            s1 = sb.toString();        }        if (b2 != null) {            StringBuffer sb = new StringBuffer();            for (int i = 0; i < b2.length; i++) {                String h = Integer.toHexString(b2[i] & 0xff);                if (h.length() < 2) {                    sb.append("0");                }                sb.append(h).append(" ");            }            s2 = sb.toString();        }        assertEquals(s1, s2);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
高清久久久久久| 欧美美女一区二区三区| 欧美一三区三区四区免费在线看| 日韩制服丝袜先锋影音| 欧美日韩国产色站一区二区三区| 国产亚洲成aⅴ人片在线观看 | 亚洲日本在线观看| 国产精品99精品久久免费| 2019国产精品| 国产精品资源在线| 国产亚洲欧美一区在线观看| 国内精品免费在线观看| 久久久久国产一区二区三区四区| 国产一区二区在线免费观看| 久久先锋影音av鲁色资源网| 国产精品123区| 欧美韩国日本一区| 不卡欧美aaaaa| 1024成人网| 日本高清成人免费播放| 亚洲18色成人| 日韩一级高清毛片| 国产永久精品大片wwwapp| 国产午夜精品一区二区三区嫩草| 成人av动漫网站| 亚洲精品成人a在线观看| 欧美日韩和欧美的一区二区| 日本不卡高清视频| 久久综合五月天婷婷伊人| 国产成人精品免费在线| 亚洲视频1区2区| 欧美色网站导航| 久久激情五月激情| 国产视频911| 色哟哟精品一区| 五月综合激情婷婷六月色窝| 日韩天堂在线观看| 丰满白嫩尤物一区二区| 亚洲欧美另类久久久精品2019| 欧美色精品天天在线观看视频| 日本麻豆一区二区三区视频| 久久这里只精品最新地址| 高清beeg欧美| 亚洲高清一区二区三区| 精品国产一区二区精华| 不卡欧美aaaaa| 天堂在线一区二区| 久久久久久久精| 91黄色免费看| 久久精品国产99久久6| 国产精品无码永久免费888| 91久久精品日日躁夜夜躁欧美| 蜜臂av日日欢夜夜爽一区| 亚洲国产精品二十页| 欧美午夜视频网站| 国产麻豆视频一区| 亚洲自拍偷拍av| 亚洲精品在线观看网站| 日本道免费精品一区二区三区| 美国十次了思思久久精品导航| 国产精品久久精品日日| 777奇米成人网| 成人免费看黄yyy456| 日韩电影在线免费| 国产精品天天摸av网| 在线成人免费视频| 波多野结衣精品在线| 秋霞午夜av一区二区三区| 国产精品久久久久久久久久久免费看 | 午夜不卡av免费| 欧美激情一区不卡| 欧美一区二区三区视频免费| 不卡欧美aaaaa| 激情小说欧美图片| 一二三区精品福利视频| 久久久国产一区二区三区四区小说 | 国产精品色在线| 日韩西西人体444www| 91香蕉视频污在线| 国产成人综合亚洲91猫咪| 日本伊人色综合网| 一区二区在线观看免费| 久久久久9999亚洲精品| 9191国产精品| 91福利国产精品| 不卡一卡二卡三乱码免费网站| 久久99精品一区二区三区| 亚洲一区在线观看免费| 国产精品你懂的在线| 精品国产乱码久久久久久1区2区| 欧美日韩在线播放三区| 91麻豆产精品久久久久久| 国产成人免费在线视频| 久久精品国产亚洲高清剧情介绍| 亚洲成av人片一区二区梦乃| 国产精品久久三区| 久久久久久久久一| 日韩一级片在线观看| 欧美久久一二区| 91久久人澡人人添人人爽欧美| 成人av高清在线| 丰满少妇在线播放bd日韩电影| 久久99精品久久久久久久久久久久| 亚洲成人免费在线观看| 夜夜嗨av一区二区三区四季av| 中文字幕色av一区二区三区| 国产婷婷色一区二区三区| 精品久久一区二区| 日韩久久免费av| 欧美一级xxx| 56国语精品自产拍在线观看| 欧美日韩一级视频| 欧美三级电影网站| 欧美色爱综合网| 在线观看国产日韩| 色婷婷久久99综合精品jk白丝 | 国产一区二区三区在线看麻豆| 青青国产91久久久久久| 日本三级亚洲精品| 日本成人中文字幕| 日产欧产美韩系列久久99| 日本不卡的三区四区五区| 日本va欧美va欧美va精品| 日韩福利视频网| 欧美a级理论片| 奇米777欧美一区二区| 麻豆专区一区二区三区四区五区| 喷白浆一区二区| 久久99热国产| 国产伦精品一区二区三区免费迷| 麻豆91精品视频| 国产一区二区三区国产| 国产成人精品影视| 99在线精品免费| 91久久香蕉国产日韩欧美9色| 在线亚洲精品福利网址导航| 欧美亚洲愉拍一区二区| 欧美美女直播网站| 日韩女优电影在线观看| 26uuu亚洲综合色欧美| 国产视频一区不卡| 综合在线观看色| 一区二区三区精品在线观看| 亚洲成a人片在线观看中文| 日本不卡一区二区三区高清视频| 美国av一区二区| 国产sm精品调教视频网站| 95精品视频在线| 欧美日韩久久久| 日韩一区二区三区观看| 久久久综合精品| 亚洲欧美在线aaa| 亚洲国产裸拍裸体视频在线观看乱了 | 青青草伊人久久| 精品亚洲欧美一区| 粉嫩在线一区二区三区视频| 色呦呦一区二区三区| 欧美肥妇毛茸茸| 精品福利一区二区三区免费视频| 欧美激情一区二区三区四区| 亚洲精品一卡二卡| 日本va欧美va瓶| 成人美女视频在线看| 欧美性受xxxx黑人xyx性爽| 日韩一区二区精品在线观看| 日本一区二区高清| 亚洲国产精品一区二区久久恐怖片| 美日韩一级片在线观看| 粉嫩一区二区三区在线看| 欧美在线|欧美| 久久伊人中文字幕| 亚洲人吸女人奶水| 琪琪一区二区三区| 成人免费高清视频| 7777精品伊人久久久大香线蕉完整版| 精品国产免费一区二区三区香蕉| 国产精品国产三级国产aⅴ中文 | 亚洲国产一区视频| 国产原创一区二区| 在线国产亚洲欧美| 精品三级在线看| 亚洲少妇最新在线视频| 青椒成人免费视频| 91社区在线播放| 日韩欧美一卡二卡| 亚洲麻豆国产自偷在线| 麻豆国产欧美日韩综合精品二区| 99精品偷自拍| 日韩美女在线视频| 一区二区欧美国产| 国产福利91精品一区二区三区| 欧美日韩午夜在线视频| 中文无字幕一区二区三区| 婷婷久久综合九色综合绿巨人| 国产99精品在线观看| 欧美蜜桃一区二区三区| 国产精品久久久久久久久免费樱桃| 免费三级欧美电影| 在线观看视频91| 中文字幕欧美区|