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

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

?? cwspcapabilities.java~1~

?? jwap 協議 udp 可以用于手機通訊
?? JAVA~1~
字號:
/** * 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.pdu;import net.sourceforge.jwap.util.*;import java.util.*;/** * Capabilities allow the client to negotiate characteristics * and extended behaviours of the protocol (see section 8.3 of the WSP spec.). */public class CWSPCapabilities {    /**     * Table 37     */    public static final short TYPE_clientSDUSize = 0x00;    public static final short TYPE_serverSDUSize = 0x01;    public static final short TYPE_protocolOptions = 0x02;    public static final short TYPE_methodMOR = 0x03;    public static final short TYPE_pushMOR = 0x04;    public static final short TYPE_extendedMethods = 0x05;    public static final short TYPE_headerCodePages = 0x06;    public static final short TYPE_aliases = 0x07;    public static final short TYPE_clientMessageSize = 0x08;    public static final short TYPE_serverMessageSize = 0x09;    /**     * section 8.3.2.3     */    public static final short OPTION_CONF_PUSH_FACILITY = 0x80;    public static final short OPTION_PUSH_FACILITY = 0x40;    public static final short OPTION_SESSION_RESUME_FACILITY = 0x20;    public static final short OPTION_ACK_HEADERS = 0x10;    public static final short OPTION_LARGE_DATA_TRANSFER = 0x08;    /**     * section 8.3.2.1     * unintvar     */    private long clientSDUSize = 1024;    private boolean bClientSDUSize = false;    private long serverSDUSize = 1024;    private boolean bServerSDUSize = false;    /**     * section 8.3.2.3     * one octet     */    private long protocolOptions = 0x00;    private boolean bProtocolOptions = false;    /**     * section 8.3.2.4     * uint8     */    private long methodMOR = 1;    private boolean bMethodMOR = false;    private long pushMOR = 1;    private boolean bPushMOR = false;    /**     * section 8.3.2.5     * uint8     * multiple octets     */    private Hashtable extendedMethods = new Hashtable();    /**     * section 8.3.2.6     * uint8     * multiple octets     */    private Hashtable headerCodePages = new Hashtable();    /**     * section 8.3.2.7     * multiple octets     * encoded as redirect address in sec. 8.2.2.3     *     * BearerTypeIncluded, PortNumberIncluded, AddressLength     */    Vector aliases = new Vector();    /**     * section 8.3.2.2     * unintvar     */    private long clientMessageSize = 1024;    private boolean bClientMessageSize = false;    private long serverMessageSize = 1024;    private boolean bServerMessageSize = false;    /////////////////////////////////////////////////////////////////////////////    //////////////////////////////// GET/SET ////////////////////////////////////    public void setClientSDUSize(long clientSDUSize) {        this.clientSDUSize = clientSDUSize;        this.bClientSDUSize = true;    }    public long getClientSDUSize() {        return clientSDUSize;    }    public void setServerSDUSize(long serverSDUSize) {        this.serverSDUSize = serverSDUSize;        this.bServerSDUSize = true;    }    public long getServerSDUSize() {        return serverSDUSize;    }    /**     * set a protocoloption     * use constans in this class beginning with "OPTION_"     */    public void setProtocolOption(short option, boolean on_off) {        if (on_off) {            if (!getProtocolOption(option)) {                this.bProtocolOptions = true;                protocolOptions += option;            }        } else {            if (getProtocolOption(option)) {                protocolOptions -= option;            }        }    }    /**     * is the Option <code>option</code> set?     * use constants in this class beginnig with "OPTION_"     */    public boolean getProtocolOption(short option) {        BitSet s = BitArrayOutputStream.getBitSet(getProtocolOptions());        return s.get((int) (Math.log(option) / Math.log(2)));    }    public byte getProtocolOptions() {        BitArrayOutputStream m = new BitArrayOutputStream();        m.write(protocolOptions, 8);        byte[] b = m.toByteArray();        return b[0];    }    public void setMethodMOR(long methodMOR) {        this.methodMOR = methodMOR;        this.bMethodMOR = true;    }    public long getMethodMOR() {        return methodMOR;    }    public void setPushMOR(long pushMOR) {        this.pushMOR = pushMOR;        this.bPushMOR = true;    }    public long getPushMOR() {        return pushMOR;    }    public Hashtable getExtendedMethods() {        return extendedMethods;    }    public boolean addExtendedMethod(long pduType, String name) {        Long toAdd = new Long(pduType);        Enumeration keys = extendedMethods.keys();        while (keys.hasMoreElements()) {            Long akt = (Long) (keys.nextElement());            if (toAdd.equals(akt)) {                return false;            }        }        extendedMethods.put(new Long(pduType), name);        return true;    }    public boolean removeExtendedMethod(long pduType) {        Long search = new Long(pduType);        Enumeration keys = extendedMethods.keys();        while (keys.hasMoreElements()) {            Long akt = (Long) (keys.nextElement());            if (search.equals(akt)) {                extendedMethods.remove(akt);                return true;            }        }        return false;    }    public Hashtable getHeaderCodePages() {        return headerCodePages;    }    /**     * add a header code page     */    public boolean addHeaderCodePage(long pageCode, String name) {        Long toAdd = new Long(pageCode);        Enumeration keys = headerCodePages.keys();        while (keys.hasMoreElements()) {            Long akt = (Long) (keys.nextElement());            if (toAdd.equals(akt)) {                return false;            }        }        headerCodePages.put(toAdd, name);        return true;    }    /**     * remove a header code page if it exists.     */    public boolean removeHeaderCodePage(long pageCode) {        Long search = new Long(pageCode);        Enumeration keys = headerCodePages.keys();        while (keys.hasMoreElements()) {            Long akt = (Long) (keys.nextElement());            if (search.equals(akt)) {                headerCodePages.remove(akt);                return true;            }        }        return false;    }    public Vector getAliases() {        return aliases;    }    /**     * add a alias (alternate address of the sender)     */    public boolean addAlias(boolean bearerTypeIncluded,        boolean portNumberIncluded, short bearerType, int portNumber,        String bearerAddressToUse) {        CWSPAddress toAdd = new CWSPAddress(bearerTypeIncluded,                portNumberIncluded, bearerType, portNumber, bearerAddressToUse);        for (int i = 0; i < aliases.size(); i++) {            CWSPAddress search = (CWSPAddress) aliases.elementAt(i);            if (search.equals(toAdd)) {                return false;            }        }        aliases.add(toAdd);        return true;    }    /**     * remove a alias using the values as given     */    public boolean removeAlias(boolean bearerTypeIncluded,        boolean portNumberIncluded, short bearerType, int portNumber,        String bearerAddressToUse) {        CWSPAddress toRemove = new CWSPAddress(bearerTypeIncluded,                portNumberIncluded, bearerType, portNumber, bearerAddressToUse);        for (int i = 0; i < aliases.size(); i++) {            CWSPAddress search = (CWSPAddress) aliases.elementAt(i);            if (search.equals(toRemove)) {                aliases.remove(search);                return true;            }        }        return false;    }    public long getClientMessageSize() {        return clientMessageSize;    }    public void setClientMessageSize(long size) {        clientMessageSize = size;        this.bClientMessageSize = true;    }    public long getServerMessageSize() {        return serverMessageSize;    }    public void setServerMessageSize(long size) {        serverMessageSize = size;        this.bServerMessageSize = true;    }    /**     * encode all capabilities in a byte array     * according to WAP-230-WSP-20010705-a section 8.3 "capability encoding"     *     * @return The encoded bytes     */    public byte[] getBytes() {        BitArrayOutputStream result = new BitArrayOutputStream();        BitArrayOutputStream tmp = new BitArrayOutputStream();        byte[] tmp2;        if (this.bClientSDUSize) {            tmp.write(TYPE_clientSDUSize + 0x80, 8);            tmp.writeUintVar(clientSDUSize);            tmp2 = tmp.toByteArray();            result.writeUintVar(tmp2.length);            result.write(tmp2);        }        if (bServerSDUSize) {            tmp.reset();            tmp.write(TYPE_serverSDUSize + 0x80, 8);            tmp.writeUintVar(serverSDUSize);            tmp2 = tmp.toByteArray();            result.writeUintVar(tmp2.length);            result.write(tmp2);        }        if (bClientMessageSize) {            tmp.reset();            tmp.write(TYPE_clientMessageSize + 0x80, 8);            tmp.writeUintVar(clientMessageSize);            tmp2 = tmp.toByteArray();            result.writeUintVar(tmp2.length);            result.write(tmp2);        }        if (bServerMessageSize) {            tmp.reset();            tmp.write(TYPE_serverMessageSize + 0x80, 8);            tmp.writeUintVar(serverMessageSize);            tmp2 = tmp.toByteArray();            result.writeUintVar(tmp2.length);            result.write(tmp2);        }        if (bProtocolOptions) {            tmp.reset();            tmp.write(TYPE_protocolOptions + 0x80, 8);            tmp.write(protocolOptions, 8);            tmp2 = tmp.toByteArray();            result.writeUintVar(tmp2.length);            result.write(tmp2);        }        if (bMethodMOR) {            tmp.reset();            tmp.write(TYPE_methodMOR + 0x80, 8);            tmp.writeUintVar(methodMOR);            tmp2 = tmp.toByteArray();            result.writeUintVar(tmp2.length);            result.write(tmp2);        }        if (bPushMOR) {            tmp.reset();            tmp.write(TYPE_pushMOR + 0x80, 8);            tmp.writeUintVar(pushMOR);            tmp2 = tmp.toByteArray();            result.writeUintVar(tmp2.length);            result.write(tmp2);        }        if (!extendedMethods.isEmpty()) {            Enumeration keys = extendedMethods.keys();            while (keys.hasMoreElements()) {                tmp.reset();                Object key = keys.nextElement();                tmp.write(TYPE_extendedMethods + 0x80, 8);                tmp.write(((Long) key).longValue(), 8);                String value = (String) (extendedMethods.get(key));                tmp.write(value.getBytes());                tmp.write(0x00, 8);                tmp2 = tmp.toByteArray();                result.writeUintVar(tmp2.length);                result.write(tmp2);            }        }        if (!headerCodePages.isEmpty()) {            Enumeration keys = extendedMethods.keys();            while (keys.hasMoreElements()) {                tmp.reset();                Object key = keys.nextElement();                tmp.write(TYPE_headerCodePages + 0x80, 8);                tmp.write(((Long) key).longValue(), 8);                String value = (String) (extendedMethods.get(key));                tmp.write(value.getBytes());                tmp.write(0x00, 8);                tmp2 = tmp.toByteArray();                result.writeUintVar(tmp2.length);                result.write(tmp2);            }        }        if (!aliases.isEmpty()) {            for (int i = 0; i < aliases.size(); i++) {                tmp.reset();                CWSPAddress address = (CWSPAddress) aliases.elementAt(i);                tmp.write(TYPE_aliases + 0x80, 8);                tmp.write(address.getBytes());                tmp2 = tmp.toByteArray();                result.writeUintVar(tmp2.length);                result.write(tmp2);            }        }        return result.toByteArray();    }    /**     * Test method     *     * @param args ignored     */    public static void main(String[] args) {        CWSPCapabilities c = new CWSPCapabilities();        c.setProtocolOption(OPTION_PUSH_FACILITY, true);        c.setProtocolOption(OPTION_LARGE_DATA_TRANSFER, true);        byte b = c.getProtocolOptions();        System.out.println(BitArrayOutputStream.getBitString(b));    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区婷婷月色| av在线不卡电影| 91精品国产色综合久久ai换脸| 夜夜亚洲天天久久| 欧美三级日本三级少妇99| 亚洲一区二区三区四区五区中文| 色婷婷av一区二区三区大白胸| 亚洲永久精品大片| 5566中文字幕一区二区电影| 久久精品国产77777蜜臀| 精品久久久久av影院| 韩国三级中文字幕hd久久精品| 国产网站一区二区三区| 99这里只有精品| 亚洲一区av在线| 日韩一区和二区| 国产精品乡下勾搭老头1| 欧美经典一区二区三区| 91一区二区在线观看| 午夜一区二区三区视频| 日韩欧美一级二级三级久久久| 国产精品自拍av| 一级做a爱片久久| 久久影院视频免费| 99re在线精品| 久久91精品久久久久久秒播| 久久精品视频在线免费观看| 色婷婷精品大在线视频 | 国产一区二区看久久| 中文字幕中文乱码欧美一区二区| 欧美影院午夜播放| 国产一区中文字幕| 亚洲毛片av在线| 欧美va亚洲va| 日本高清不卡视频| 国内久久精品视频| 偷偷要91色婷婷| 久久综合色播五月| 色综合久久久久网| 激情综合网最新| 亚洲男人的天堂av| 久久欧美中文字幕| 欧美日韩精品一区二区三区四区| 韩国精品一区二区| 亚洲成人一区二区| 国产精品乱码一区二区三区软件| 欧美性猛交xxxx黑人交| 风间由美性色一区二区三区| 日韩高清在线电影| 亚洲亚洲精品在线观看| 中文字幕成人在线观看| 欧美成人bangbros| 91精品国产综合久久精品麻豆| av激情综合网| 国产馆精品极品| 韩国精品一区二区| 日韩av二区在线播放| 亚洲精品日韩综合观看成人91| 欧美国产精品专区| 久久这里只有精品6| 欧美一区二区三区在线视频| 欧美亚洲免费在线一区| 91亚洲男人天堂| 成人美女视频在线看| 国产精品亚洲一区二区三区妖精| 日本视频一区二区三区| 亚洲国产成人av网| 亚洲精品久久久蜜桃| 自拍偷拍亚洲激情| 国产精品久久久久久久久图文区| 久久九九久精品国产免费直播| 欧美一区午夜精品| 欧美一区二区三区免费在线看 | 5858s免费视频成人| 色av一区二区| 在线视频你懂得一区| 99精品在线观看视频| 97精品视频在线观看自产线路二| 国产成人精品网址| 成人午夜看片网址| 成人免费毛片片v| 成人性生交大片免费看中文| 成人精品国产一区二区4080| 成人听书哪个软件好| eeuss鲁片一区二区三区在线看| www.欧美精品一二区| 91首页免费视频| 在线观看视频一区二区| 欧美精品久久一区| 日韩精品中文字幕在线不卡尤物| 精品欧美一区二区三区精品久久| 久久久久99精品一区| 欧美国产精品中文字幕| 国产精品成人免费| 一区二区三区精品视频在线| 亚洲电影一区二区| 日韩综合小视频| 国产一二精品视频| 成人av网站大全| 欧美中文字幕不卡| 欧美一级黄色录像| 国产午夜精品一区二区三区嫩草| 国产精品乱人伦中文| 亚洲永久精品大片| 久久精品国产精品青草| 国产精品亚洲一区二区三区在线| 成人激情免费电影网址| 欧美亚洲丝袜传媒另类| 欧美成人激情免费网| 欧美国产精品中文字幕| 亚洲国产欧美在线| 国产一区二区视频在线播放| 97se亚洲国产综合在线| 91精品婷婷国产综合久久竹菊| 欧美精品一区二区三区在线播放| 中国av一区二区三区| 亚洲精品一二三| 精品午夜久久福利影院| 99热精品一区二区| 717成人午夜免费福利电影| 久久久久久久综合狠狠综合| 亚洲欧美欧美一区二区三区| 免费观看日韩电影| av影院午夜一区| 欧美精品一区二区三区很污很色的 | 国产一区二区在线免费观看| 99re热这里只有精品视频| 91精品国产一区二区人妖| 欧美经典三级视频一区二区三区| 五月婷婷久久丁香| 成人黄色在线网站| 欧美一区二区精美| 亚洲一二三区不卡| 成人黄色777网| 日韩三级视频在线看| 一区二区三区国产豹纹内裤在线| 国产麻豆视频精品| 欧美一区二区三区成人| 亚洲精品大片www| 成人午夜av在线| 精品国产乱码久久久久久老虎| 亚洲免费观看高清完整版在线观看 | 国产乱人伦偷精品视频不卡 | 精品欧美一区二区三区精品久久| 亚洲精品高清在线| 不卡的av网站| 国产视频一区在线观看| 日韩激情一区二区| 欧日韩精品视频| 日韩美女视频一区二区| 成人综合日日夜夜| 久久一夜天堂av一区二区三区| 日韩国产欧美在线视频| 欧美性受xxxx黑人xyx| 最新中文字幕一区二区三区| 国模无码大尺度一区二区三区| 91精品国产欧美日韩| 亚洲一区二区三区中文字幕在线 | 色婷婷国产精品综合在线观看| 国产欧美精品区一区二区三区 | 成人av综合一区| 久久老女人爱爱| 国内精品自线一区二区三区视频| 日韩一级黄色片| 免费在线观看成人| 日韩精品资源二区在线| 蜜桃av一区二区三区| 678五月天丁香亚洲综合网| 亚洲成人高清在线| 欧美三区在线观看| 一区二区三区四区不卡视频| 成人av网站免费| 亚洲视频免费在线观看| 91麻豆蜜桃一区二区三区| 亚洲视频图片小说| 在线观看免费一区| 一区二区欧美视频| 欧美日韩大陆在线| 日韩电影免费在线看| 日韩欧美在线网站| 国产乱码字幕精品高清av| 国产校园另类小说区| 93久久精品日日躁夜夜躁欧美| 一区精品在线播放| 欧美怡红院视频| 日韩电影免费在线观看网站| 精品国产自在久精品国产| 国产成人综合在线观看| 国产精品―色哟哟| 91丨九色丨国产丨porny| 亚洲一区二区在线播放相泽| 欧美人与z0zoxxxx视频| 青青青爽久久午夜综合久久午夜| 欧美videos中文字幕| 本田岬高潮一区二区三区| 一区二区三区四区高清精品免费观看 | 国产精品亚洲а∨天堂免在线| 国产精品狼人久久影院观看方式| 日本韩国精品在线| 老司机午夜精品99久久|