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

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

?? cachesizes.java

?? Jvie論壇的程序
?? JAVA
字號:
/**
 * $RCSfile: CacheSizes.java,v $
 * $Revision: 1.2 $
 * $Date: 2000/12/21 03:21:38 $
 *
 * Copyright (C) 2000 CoolServlets.com. All rights reserved.
 *
 * ===================================================================
 * The Apache Software License, Version 1.1
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by
 *        CoolServlets.com (http://www.Yasna.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Jive" and "CoolServlets.com" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please
 *    contact webmaster@Yasna.com.
 *
 * 5. Products derived from this software may not be called "Jive",
 *    nor may "Jive" appear in their name, without prior written
 *    permission of CoolServlets.com.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL COOLSERVLETS.COM OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of CoolServlets.com. For more information
 * on CoolServlets.com, please see <http://www.Yasna.com>.
 */

package com.Yasna.util;

import java.util.*;

/**
 * Utility class for determining the sizes in bytes of commonly used objects.
 * Classes implementing the Cacheable interface should use this class to
 * determine their size.
 */
public class CacheSizes {

    /**
     * Returns the size in bytes of a basic Object. This method should only
     * be used for actual Object objects and not classes that extend Object.
     *
     * @return the size of an Object.
     */
    public static int sizeOfObject() {
        return 4;
    }

    /**
     * Returns the size in bytes of a String.
     *
     * @param string the String to determine the size of.
     * @return the size of a String.
     */
    public static int sizeOfString(String string) {
        if (string == null) {
            return 0;
        }
        return 4 + string.length()*2;
    }

    /**
     * Returns the size in bytes of a primitive int.
     *
     * @return the size of a primitive int.
     */
    public static int sizeOfInt() {
        return 4;
    }

    /**
     * Returns the size in bytes of a primitive char.
     *
     * @return the size of a primitive char.
     */
    public static int sizeOfChar() {
        return 2;
    }

    /**
     * Returns the size in bytes of a primitive boolean.
     *
     * @return the size of a primitive boolean.
     */
    public static int sizeOfBoolean() {
        return 1;
    }

    /**
     * Returns the size in bytes of a primitive long.
     *
     * @return the size of a primitive long.
     */
    public static int sizeOfLong() {
        return 8;
    }

    /**
     * Returns the size in bytes of a primitive double.
     *
     * @return the size of a primitive double.
     */
    public static int sizeOfDouble() {
        return 8;
    }

    /**
     * Returns the size in bytes of a Date.
     *
     * @return the size of a Date.
     */
    public static int sizeOfDate() {
        return 12;
    }

    /**
     * Returns the size in bytes of a Properties object. All properties and
     * property names must be Strings.
     *
     * @param properties the Properties object to determine the size of.
     * @return the size of a Properties object.
     */
    public static int sizeOfProperties(Properties properties) {
        if (properties == null) {
            return 0;
        }
        //Base properties object
        int size = 36;
        //Add in size of each property
        Enumeration enum = properties.elements();
        while(enum.hasMoreElements()) {
            String prop = (String)enum.nextElement();
            size += sizeOfString(prop);
        }
        //Add in property names
        enum = properties.propertyNames();
        while(enum.hasMoreElements()) {
            String prop = (String)enum.nextElement();
            size += sizeOfString(prop);
        }
        return size;
    }

    /**
     * Returns the size in bytes of a Map object. All keys and
     * values <b>must be Strings</b>.
     *
     * @param map the Map object to determine the size of.
     * @return the size of the Map object.
     */
    public static int sizeOfMap(Map map) {
        if (map == null) {
            return 0;
        }
        //Base map object -- should be something around this size.
        int size = 36;
        //Add in size of each value
        Iterator iter = map.values().iterator();
        while(iter.hasNext()) {
            String value = (String)iter.next();
            size += sizeOfString(value);
        }
        //Add in each key
        iter = map.keySet().iterator();
        while(iter.hasNext()) {
            String key = (String)iter.next();
            size += sizeOfString(key);
        }
        return size;
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久久久99精品| 色综合夜色一区| 欧美一区2区视频在线观看| 亚洲免费观看高清完整版在线观看 | 国产成人精品www牛牛影视| 7777精品伊人久久久大香线蕉经典版下载| 亚洲三级电影网站| 99久久久无码国产精品| 中文字幕一区日韩精品欧美| voyeur盗摄精品| 国产日韩亚洲欧美综合| 成人小视频免费观看| 国产精品美女一区二区三区| 国内成人免费视频| 国产亚洲精品7777| 成人高清av在线| 一区二区三区中文免费| 欧美精品自拍偷拍动漫精品| 青娱乐精品视频| 久久综合久久鬼色中文字| 国产宾馆实践打屁股91| 中文字幕人成不卡一区| 欧美亚洲国产一区二区三区| 图片区小说区区亚洲影院| 欧美mv日韩mv| 91偷拍与自偷拍精品| 一区二区三区在线免费| 91麻豆精品国产91久久久久久 | 日韩欧美国产1| 国产久卡久卡久卡久卡视频精品| 国产精品视频九色porn| 在线免费观看一区| 韩日精品视频一区| 亚洲欧美一区二区三区极速播放| 91麻豆精品国产自产在线观看一区| 国产在线播放一区三区四| 国产精品成人午夜| 91麻豆国产福利精品| 日韩激情中文字幕| 中文字幕日韩一区| 777奇米四色成人影色区| 国产超碰在线一区| 日产国产高清一区二区三区| 国产精品私人影院| 日韩免费视频一区二区| 成人动漫av在线| 美女www一区二区| 亚洲精品久久久蜜桃| 91麻豆精品国产91久久久资源速度| 国产精品一二二区| 亚洲国产精品影院| 亚洲精品一区在线观看| 欧美视频在线观看一区| 国产suv精品一区二区三区| 18欧美乱大交hd1984| 精品国产乱码久久久久久牛牛| 91丨porny丨户外露出| 国产在线一区二区| 日韩成人av影视| 樱桃视频在线观看一区| 久久久精品综合| 欧美大片一区二区| 日韩欧美一级在线播放| 这里只有精品电影| 欧美日韩aaaaaa| 欧美日韩高清一区二区不卡| 欧美亚洲一区三区| 欧美亚洲动漫精品| 欧美日韩一区精品| 欧美亚洲自拍偷拍| 欧美裸体bbwbbwbbw| 91高清视频在线| 91久久免费观看| 欧美在线free| 欧美色图一区二区三区| 欧美日韩高清一区| 日韩欧美一区中文| 337p日本欧洲亚洲大胆精品| 久久久不卡网国产精品一区| 国产亚洲一区二区三区四区| 日本一区二区三区在线不卡| 国产精品久久一卡二卡| **欧美大码日韩| 亚洲一区二区三区四区在线观看| 亚洲国产视频a| 日韩电影网1区2区| 国产精品一区在线观看你懂的| 国产成人丝袜美腿| 99riav一区二区三区| 欧美影视一区在线| 日韩视频免费观看高清在线视频| 日韩欧美国产成人一区二区| 久久久亚洲欧洲日产国码αv| 国产日韩欧美电影| 亚洲一区自拍偷拍| 久久成人免费网站| 成人激情开心网| 欧美三级视频在线| 日韩精品中文字幕一区二区三区| 国产婷婷精品av在线| 亚洲精品日韩一| 免费成人美女在线观看.| 国产精品911| 色吧成人激情小说| 日韩欧美123| 综合久久久久综合| 日本欧美大码aⅴ在线播放| 国产aⅴ综合色| 欧美日韩一二三区| 久久久久国产精品麻豆| 亚洲已满18点击进入久久| 美女mm1313爽爽久久久蜜臀| 成人国产视频在线观看 | 欧美电影一区二区| 久久久久久久久久久黄色| 亚洲黄色片在线观看| 六月丁香婷婷久久| 色婷婷综合五月| 2023国产精品自拍| 亚洲成人福利片| 懂色av一区二区三区免费观看| 欧美日韩在线三级| 国产人成亚洲第一网站在线播放| 亚洲综合色噜噜狠狠| 国产精品自产自拍| 欧美丰满一区二区免费视频| 中文一区在线播放| 五月天亚洲精品| www.日韩av| 久久久久久电影| 日本亚洲电影天堂| 欧美羞羞免费网站| 国产精品久久久久久妇女6080 | 欧美日韩国产首页在线观看| 中文在线免费一区三区高中清不卡| 日韩不卡手机在线v区| 91猫先生在线| 国产女人18水真多18精品一级做| 日本aⅴ亚洲精品中文乱码| 色婷婷精品大视频在线蜜桃视频| 久久精品人人做| 麻豆一区二区在线| 欧美日韩免费观看一区二区三区| 国产精品久久久久久久岛一牛影视| 精品一区二区三区在线观看国产| 欧美人动与zoxxxx乱| 一区二区三区加勒比av| 成人综合激情网| 久久精品欧美日韩| 久久精品二区亚洲w码| 欧美精品在线观看一区二区| 亚洲综合激情小说| 色综合久久中文综合久久牛| 国产精品视频九色porn| 国产宾馆实践打屁股91| 国产喷白浆一区二区三区| 国产美女精品人人做人人爽| 久久只精品国产| 国产老妇另类xxxxx| 精品国产一区久久| 国产一区视频在线看| 国产婷婷色一区二区三区在线| 国产精品一区免费在线观看| 久久久久久久综合| 国产精品99久久久久久有的能看 | 91精品国产欧美一区二区18| 婷婷成人综合网| 7777精品伊人久久久大香线蕉超级流畅 | 国内外精品视频| 亚洲精品一区在线观看| 国产乱人伦偷精品视频免下载 | 中文字幕一区二区三区四区| 99免费精品在线| 亚洲欧美国产毛片在线| 91视频免费播放| 亚洲久草在线视频| 欧美日韩二区三区| 青青草国产精品97视觉盛宴| 精品国产一区二区在线观看| 国产一区二区不卡老阿姨| 欧美国产一区视频在线观看| 99re这里都是精品| 午夜精品久久久久久久| 日韩一区二区免费在线观看| 国产一区日韩二区欧美三区| 国产精品午夜春色av| 91传媒视频在线播放| 日本在线播放一区二区三区| 久久精品亚洲精品国产欧美| 97se亚洲国产综合在线| 午夜精品久久久久| 精品国产免费久久| www.成人在线| 亚洲成人av电影| 久久伊人蜜桃av一区二区| 成+人+亚洲+综合天堂| 亚洲va天堂va国产va久| 久久久久9999亚洲精品| 色偷偷久久一区二区三区| 日韩av一区二区在线影视|