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

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

?? asnoctets.java

?? 無線網絡管理
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
        }        return str;    }    int size()     {         return value.length;     }    void write(OutputStream out, int pos) throws IOException     {        int idx;        // Output header        AsnBuildHeader(out, type, value.length);        if (debug > 10)        {            System.out.println("\tAsnOctets(): value = " + toString()                + ", pos = " + pos);        }                // Output data        for (idx=0; idx<value.length; idx++)         {            out.write(value[idx]);        }    }    /**     * Returns this Octet as an IP Address string. The format is     * aaa.bbb.ccc.ddd (IPv4) or a:b:c:d:e:f:g:h (IPv6).     *     * Note, the SNMP representation of IPv4 and IPv6 is different:     * <ul>     *    <li>IPv4: IPADDRESS (or ASN_OCTET_STR, see rfc 4001)</li>     *    <li>IPv6: ASN_OCTET_STR</li>     * </ul>     * See also      * <a href="http://www.ietf.org/rfc/rfc2465.txt">IPV6-TC</a>,     * <a href="http://www.ietf.org/rfc/rfc3416.txt">SNMPv2-PDU</a>,     * <a href="http://www.ietf.org/rfc/rfc4001.txt">INET-ADDRESS-MIB</a>.     *     * @return The IP Address representation.     * @see #toString     * @see #getIpAddress     * @see SnmpConstants#ASN_OCTET_STR     * @see SnmpConstants#IPADDRESS     */    /*     TODO: use Java's java.net.InetAddress, so it can be used for IPv4, and IPv6.     */    public String toIpAddress()    {        /* TODO: Does this work? Yes, but will not compile in jdk 1.2.X, and          * in order to load (a part of) the stack in Oracle, I need         * 1.2.X         */        /*        String str = "";        try        {            InetAddress iad = InetAddress.getByAddress(value);            str = iad.getHostAddress();        }        catch (java.net.UnknownHostException exc) { }        */        /*        */        StringBuffer sb = new StringBuffer(39);        int length;        long val;        length = value.length;        if (length > 0)        {            if (length > 4)            {                // IPv6                // Nicked this code from Inet6Address.numericToTextFormat                for (int i=0; i<length/2; i++)                 {                    sb.append(Integer.toHexString(((value[i<<1]<<8) & 0xff00)                                                 | (value[(i<<1)+1] & 0xff)));                    if (i < ((length/2)-1))                    {                        sb.append(":");                    }                }            }            else            {                // IPv4                for (int i=0; i<length-1; i++)                {                    val = getPositiveValue(i);                    sb.append(String.valueOf(val)).append(".");                }                val = getPositiveValue(length-1);                sb.append(String.valueOf(val));            }        }        return sb.toString();    }    /**     * Returns this Octet as an IP Address.      *     * Note, the SNMP representation of IPv4 and IPv6 is different:     * <ul>     *    <li>IPv4: IPADDRESS (or ASN_OCTET_STR, see rfc 4001)</li>     *    <li>IPv6: ASN_OCTET_STR</li>     * </ul>     * See also      * <a href="http://www.ietf.org/rfc/rfc2465.txt">IPV6-TC</a>,     * <a href="http://www.ietf.org/rfc/rfc3416.txt">SNMPv2-PDU</a>,     * <a href="http://www.ietf.org/rfc/rfc4001.txt">INET-ADDRESS-MIB</a>.     *     * @return The IP Address representation.     * @exception java.lang.RuntimeException Thrown when the Octets does     * not represent an InetAddress or when the method internally throws     * an java.net.UnknownHostException     *     * @see #toString     * @see #toIpAddress     * @see SnmpConstants#ASN_OCTET_STR     * @see SnmpConstants#IPADDRESS     * @since 4_14     */    public InetAddress getIpAddress()    throws java.lang.RuntimeException    {        InetAddress iad = null;        try        {            iad = InetAddress.getByAddress(value);        }        catch (java.net.UnknownHostException exc)         {             throw new java.lang.RuntimeException(exc);        }        return iad;    }    /**     * Returns the positive long for an octet. Only if type is IPADDRESS     * can the value be negative anyway.     */    private long getPositiveValue(int index)    {        long val = (long) value[index];        if (val <0)        {            val += 256;         }        return val;    }        /**     * Returns this Octet as an hexadecimal String, without any prefix.      *     * @return The hex representation.     * @see #toString     */    public String toHex()    {        int length;         StringBuffer buffer = new StringBuffer("");        length = value.length;        if (length > 0)        {            for (int i=0; i<length-1; i++)            {                buffer.append(SnmpUtilities.toHex(value[i])).append(":");            }            buffer.append(SnmpUtilities.toHex(value[length-1]));        }        return buffer.toString();    }    /**     * Returns this Octet as a display string (text convension). In contrast to the     * method toString(), this method does not try to guess whether or     * not this string is printable, it just converts it to a     * String, using "US-ASCII" character set.      *     * <p>     * DisplayString     * represents textual information taken from the NVT     * ASCII character set, as defined in pages 4, 10-11     * of <a href="http://www.ietf.org/rfc/rfc854.txt">RFC 854</a>.      * Any object defined using this syntax     * may not exceed 255 characters in length.     * Basicly it is US-ASCII with some changes.     * </p>     *     * @return The string representation.     * @see #toString     */    public String toDisplayString()    {        String str = "";        int length;         length = value.length;        if (length > 0)        {            try            {                str = new String(value, "US-ASCII");            }            catch (java.io.UnsupportedEncodingException exc)            {                str = new String(value);            }            str = str.trim();        }        return str;    }    /**     * Returns this Octet as an international display string (text     * convension).      * It calls AsnOctetsPrintableFace.toInternationalDisplayString().     *     * See     * <a href="http://www.ietf.org/rfc/rfc2790.txt">HOST-RESOURCES-MIB</a>     *      * @see AsnOctetsPrintableFace#toInternationalDisplayString     * @since 4_14     */    public String toInternationalDisplayString()    {        return toInternationalDisplayString(printableObject);    }    /**     * As toInternationalDisplayString(), but this methods will use this      * specific, one-off AsnOctetsPrintableFace object.     *      * @see #toInternationalDisplayString     * @since 4_14     */    public String toInternationalDisplayString(AsnOctetsPrintableFace face)    {        return face.toInternationalDisplayString(value);    }    /**     * Returns the String representation according to the DateAndTime     * convension.     * This string it returns is not exactly the same as the     * DISPLAY-HINT indicates.     * See      * <a href="http://www.ietf.org/rfc/rfc2579.txt">SNMPv2-TC</a>     *     * @since 4_14     * @exception java.lang.RuntimeException Thrown when the number of     * Octets does not represent the DateAndTime length.      * @see #CALFORMAT     */    public String toCalendar()    throws java.lang.RuntimeException    {        Calendar cal = this.getCalendar();        Date date = cal.getTime();        return CALFORMAT.format(date);    }    /**     * Returns the Octets as Calendar according to the DateAndTime text     * convension. You can only call this method if     * the syntax of this Octet is the DateAndTime text convension.     *     * @exception java.lang.RuntimeException Thrown when the number of     * Octets does not represent the DateAndTime length.      *     * @since 4_14     * @see #AsnOctets(java.util.Calendar)     */    public java.util.Calendar getCalendar()    throws java.lang.RuntimeException    {        Calendar cal = Calendar.getInstance();        if (value.length == 8 || value.length == 11)        {            int year = (int) ((getPositiveValue(0) * 256) + getPositiveValue(1));            // Calendar: 0=January            int month = value[2]-1;             int day = value[3];            int hour = value[4];            int min = value[5];            int sec = value[6];            int msec = value[7] * 100;            cal.set(year, month, day, hour, min, sec);             cal.set(Calendar.MILLISECOND, msec);            if (value.length == 11)            {                char dir = (char) value[8];                int hourUTC = value[9];                int minUTC = value[10];                int secUTC = (hourUTC * 60) * 60;                int msecGMT = secUTC * 1000;                if (dir == '-')                {                    msecGMT = msecGMT * -1;                }                cal.set(Calendar.ZONE_OFFSET, msecGMT);            }        }        else        {            throw new java.lang.RuntimeException("AsnOctets is not DateAndTime");        }        return cal;    }/** * Converts this Octet to its corresponding sub-identifiers. * Each octet will be encoded in a separate sub-identifier, by * converting the octet into a positive long. *  * <p> * Use this method when building an OID when this Octet specifies a * conceptual row. For example ipNetToMediaEntry, see  * <a href="http://www.ietf.org/rfc/rfc2011.txt">IP-MIB</a> * or SnmpCommunityEntry, see * <a href="http://www.ietf.org/rfc/rfc3584.txt">SNMP-COMMUNITY-MIB</a> * </p> * * <p> * The variable <code>length_implied</code> indicates that this MIB variable  * is preceded by the IMPLIED keyword: * </p> * <ul> * <li> * The IMPLIED keyword can only be present for an Octet having  * a variable-length syntax (e.g., variable-length strings or object  * identifier-valued objects).  * </li> * <li> * The IMPLIED keyword can only be associated with the last * object in the INDEX clause.   * </li> * <li> * The IMPLIED keyword may not be used on a variable-length * string Octet if that string might have a value of zero-length.  * </li> * </ul> * * <p> * If the length is implied, no extra sub-identifier will be created to * indicate its length. <br/> * If the length is not implied, the first * sub-identifier will be the length of the Octet. * </p> * * <p> * If this Octet is of type IPADDRESS, length_implied should be false. * </p> * * <p> * The mapping of the INDEX clause is * explained in <a href="http://www.ietf.org/rfc/rfc2578.txt">SNMPv2-SMI</a>, * section 7.7. * </p> * * @param length_implied Indicates if the length of this octet is * implied.  * * @see AsnObjectId#add(long[]) */public long [] toSubOid(boolean length_implied){    long sub_oid[];    int index = 0;    int length = value.length;    if (length_implied)    {        sub_oid = new long[length];    }    else    {        sub_oid = new long[length+1];        sub_oid[0] = length;        index++;    }    for (int i=0; i<length; i++)    {        sub_oid[index] = getPositiveValue(i);        index++;    }    return sub_oid;}/** * Compares this Octet to the specified object. * The result is <code>true</code> if and only if the argument is not * <code>null</code> and is an <code>AsnOctets</code> object that represents * the same sequence of octets as this Octet. * * @param anObject the object to compare this <code>AsnOctets</code>  *                 against. * @return <code>true</code> if the <code>AsnOctets </code>are equal; *         <code>false</code> otherwise. */public boolean equals(Object anObject) {    if (this == anObject)     {        return true;    }    if (anObject instanceof AsnOctets)     {        AsnOctets anotherOctet = (AsnOctets)anObject;        int n = value.length;        if (n == anotherOctet.value.length)         {            byte v1[] = value;            byte v2[] = anotherOctet.value;            int i = 0;            int j = 0;            while (n-- != 0)             {                if (v1[i++] != v2[j++])                {                    return false;                }            }            return true;        }    }    return false;}/** * Returns a hash code for this Octet. The hash code for a * <code>AsnOctets</code> object is computed as * <blockquote><pre> * s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1] * </pre></blockquote> * using <code>int</code> arithmetic, where <code>s[i]</code> is the * <i>i</i>th character of the Octet, <code>n</code> is the length of * the Octet, and <code>^</code> indicates exponentiation. * (The hash value of the empty Octet is zero.) * * @return  a hash code value for this Octet. */public int hashCode() {    int h = hash;    if (h == 0)     {        int off = 0;        byte val[] = value;        int len = value.length;        for (int i=0; i<len; i++)         {            h = 31*h + val[off++];        }        hash = h;    }    return h;}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
懂色av一区二区夜夜嗨| 日韩一级片在线观看| 在线一区二区三区做爰视频网站| 欧美日韩视频在线第一区| 久久尤物电影视频在线观看| 一区二区三区中文免费| 成人av小说网| 26uuu精品一区二区在线观看| 亚洲一区二区三区激情| 成人自拍视频在线| 精品欧美一区二区久久| 亚洲444eee在线观看| 91丨porny丨在线| 国产精品色眯眯| 国产一区二区日韩精品| 91精品国产手机| 亚洲国产视频a| 欧美午夜在线观看| 一区二区久久久久| 91免费观看国产| 中文在线一区二区| 懂色av一区二区夜夜嗨| 国产人久久人人人人爽| 国产一区二区三区四区在线观看| 欧美另类变人与禽xxxxx| 亚洲图片欧美综合| 欧美人狂配大交3d怪物一区| 亚洲地区一二三色| 欧美日韩国产精品自在自线| 亚洲午夜久久久久中文字幕久| 色综合天天综合| 亚洲欧美日韩久久| 色婷婷亚洲精品| 怡红院av一区二区三区| 在线看日本不卡| 图片区小说区国产精品视频| 欧美日韩精品一区二区三区蜜桃| 亚洲高清免费观看| 欧美一区二区视频在线观看 | 欧美人与性动xxxx| 天天影视色香欲综合网老头| 91精品国产入口| 免费久久精品视频| 久久久久99精品国产片| 国产成人高清视频| 亚洲欧美日韩精品久久久久| 欧美亚洲国产一区在线观看网站| 亚洲韩国精品一区| 欧美一区二区三区视频在线| 精品中文字幕一区二区小辣椒| 精品国产凹凸成av人网站| 国产一二三精品| 日韩一区有码在线| 911国产精品| 国产成人自拍高清视频在线免费播放| 欧美国产乱子伦| 色哟哟一区二区在线观看| 五月天激情综合| 久久亚洲一区二区三区四区| 99视频国产精品| 午夜精品久久久久久不卡8050| 欧美mv和日韩mv国产网站| 成人永久免费视频| 午夜精品爽啪视频| 久久久久青草大香线综合精品| a美女胸又www黄视频久久| 天天av天天翘天天综合网色鬼国产| 欧美一区二区三区公司| 国产91精品免费| 亚洲成人免费视频| 欧美经典一区二区三区| 欧美日韩一区视频| 高清av一区二区| 日本不卡的三区四区五区| 国产精品沙发午睡系列990531| 欧美日韩国产a| 成人精品一区二区三区四区| 亚州成人在线电影| 国产精品二区一区二区aⅴ污介绍| 欧美日韩在线三级| www.欧美日韩| 国产一区二区免费在线| 亚洲国产日韩a在线播放| 久久一区二区视频| 欧美日韩国产大片| 色老综合老女人久久久| 国产成人免费视频一区| 日韩国产精品久久久| 亚洲综合色视频| 国产精品污污网站在线观看| 精品国产乱码久久久久久影片| 欧美色图12p| 在线一区二区视频| 97久久精品人人做人人爽50路| 国产伦精品一区二区三区视频青涩 | 成人国产精品免费观看动漫| 日韩国产精品久久久久久亚洲| 亚洲精品国久久99热| 国产亚洲欧美色| 26uuu久久天堂性欧美| 欧美一区二区啪啪| 欧美日韩视频第一区| 在线观看精品一区| 91色婷婷久久久久合中文| 成人网在线免费视频| 激情亚洲综合在线| 免费看欧美女人艹b| 日本欧美一区二区三区乱码| 天堂va蜜桃一区二区三区漫画版| 亚洲一区在线电影| 亚洲香肠在线观看| 亚洲www啪成人一区二区麻豆 | 亚洲国产精品成人综合| 精品国产乱码久久久久久久| 欧美xxxxxxxx| 日韩视频不卡中文| 日韩欧美的一区二区| 精品免费国产一区二区三区四区| 欧美r级在线观看| 欧美tickling网站挠脚心| 2022国产精品视频| 国产色产综合色产在线视频| 国产午夜精品福利| 国产精品麻豆99久久久久久| 日韩一区日韩二区| 一区二区三区不卡视频在线观看| 依依成人综合视频| 日韩高清电影一区| 久久国产剧场电影| 懂色av一区二区夜夜嗨| 91免费观看在线| 91精品一区二区三区久久久久久| 日韩亚洲欧美一区二区三区| 2020国产成人综合网| 亚洲欧洲美洲综合色网| 一区二区久久久| 蜜桃视频在线观看一区| 懂色一区二区三区免费观看| 91高清视频免费看| 日韩欧美成人一区| 中文字幕一区二区三区在线观看 | ●精品国产综合乱码久久久久| 洋洋av久久久久久久一区| 蜜桃视频在线观看一区| 成人福利视频在线看| 欧美偷拍一区二区| 欧美精品一区二区三区蜜桃 | 国产精品三级视频| 亚洲图片欧美一区| 国产精品一线二线三线精华| 在线亚洲高清视频| 26uuu国产在线精品一区二区| 一区免费观看视频| 老司机免费视频一区二区| 成人教育av在线| 欧美一区在线视频| 国产精品三级av在线播放| 亚瑟在线精品视频| 9色porny自拍视频一区二区| 91 com成人网| 亚洲色图欧美在线| 精品在线免费观看| 欧美精品tushy高清| 国产精品久久久久aaaa樱花| 日本不卡一区二区| 91高清视频免费看| 欧美国产成人精品| 另类小说综合欧美亚洲| 91亚洲国产成人精品一区二区三 | 亚洲成人一区在线| 成年人网站91| 欧美r级电影在线观看| 亚洲大片在线观看| 91在线播放网址| 欧美激情综合网| 麻豆国产91在线播放| 欧美日韩国产综合久久| 亚洲私人黄色宅男| 国产成人自拍网| 久久综合九色综合97婷婷女人 | 国产精品69毛片高清亚洲| 欧美日韩国产综合一区二区| 亚洲品质自拍视频网站| 国产.精品.日韩.另类.中文.在线.播放| 欧美精品在欧美一区二区少妇| 一区二区三区毛片| 色综合av在线| 亚洲精品国产一区二区精华液| 成人丝袜视频网| 国产欧美日韩精品a在线观看| 紧缚捆绑精品一区二区| 精品88久久久久88久久久| 麻豆成人免费电影| 欧美一卡二卡三卡四卡| 美女视频网站久久| 欧美一区二区三级| 久99久精品视频免费观看| 日韩情涩欧美日韩视频| 精品影视av免费| 2024国产精品视频|