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

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

?? util.java

?? java 報表 to office文檔: 本包由java語言開發
?? JAVA
字號:
/* ====================================================================   Copyright 2002-2004   Apache Software Foundation   Licensed under the Apache License, Version 2.0 (the "License");   you may not use this file except in compliance with the License.   You may obtain a copy of the License at       http://www.apache.org/licenses/LICENSE-2.0   Unless required by applicable law or agreed to in writing, software   distributed under the License is distributed on an "AS IS" BASIS,   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   See the License for the specific language governing permissions and   limitations under the License.==================================================================== */        package org.apache.poi.hpsf;import java.io.IOException;import java.io.PrintWriter;import java.io.StringWriter;import java.util.Collection;import java.util.Date;/** * <p>Provides various static utility methods.</p> * * @author Rainer Klute (klute@rainer-klute.de) * @version $Id: Util.java,v 1.14 2004/04/09 13:05:16 glens Exp $ * @since 2002-02-09 */public class Util{    /**     * <p>Checks whether two byte arrays <var>a</var> and <var>b</var>     * are equal. They are equal</p>     *     * <ul>     *     *  <li><p>if they have the same length and</p></li>     *     *  <li><p>if for each <var>i</var> with     *  <var>i</var>&nbsp;&gt;=&nbsp;0 and     *  <var>i</var>&nbsp;&lt;&nbsp;<var>a.length</var> holds     *  <var>a</var>[<var>i</var>]&nbsp;== <var>b</var>[<var>i</var>].</p></li>     *     * </ul>     *     * @param a The first byte array     * @param b The first byte array     * @return <code>true</code> if the byte arrays are equal, else     * <code>false</code>     */    public static boolean equal(final byte[] a, final byte[] b)    {        if (a.length != b.length)            return false;        for (int i = 0; i < a.length; i++)            if (a[i] != b[i])                return false;        return true;    }    /**     * <p>Copies a part of a byte array into another byte array.</p>     *     * @param src The source byte array.     * @param srcOffset Offset in the source byte array.     * @param length The number of bytes to copy.     * @param dst The destination byte array.     * @param dstOffset Offset in the destination byte array.     */    public static void copy(final byte[] src, final int srcOffset,                            final int length, final byte[] dst,                            final int dstOffset)    {        for (int i = 0; i < length; i++)            dst[dstOffset + i] = src[srcOffset + i];    }    /**     * <p>Concatenates the contents of several byte arrays into a     * single one.</p>     *     * @param byteArrays The byte arrays to be concatened.     * @return A new byte array containing the concatenated byte     * arrays.     */    public static byte[] cat(final byte[][] byteArrays)    {        int capacity = 0;        for (int i = 0; i < byteArrays.length; i++)            capacity += byteArrays[i].length;        final byte[] result = new byte[capacity];        int r = 0;        for (int i = 0; i < byteArrays.length; i++)            for (int j = 0; j < byteArrays[i].length; j++)                result[r++] = byteArrays[i][j];        return result;    }    /**     * <p>Copies bytes from a source byte array into a new byte     * array.</p>     *     * @param src Copy from this byte array.     * @param offset Start copying here.     * @param length Copy this many bytes.     * @return The new byte array. Its length is number of copied bytes.     */    public static byte[] copy(final byte[] src, final int offset,                              final int length)    {        final byte[] result = new byte[length];        copy(src, offset, length, result, 0);        return result;    }    /**     * <p>The difference between the Windows epoch (1601-01-01     * 00:00:00) and the Unix epoch (1970-01-01 00:00:00) in     * milliseconds: 11644473600000L. (Use your favorite spreadsheet     * program to verify the correctness of this value. By the way,     * did you notice that you can tell from the epochs which     * operating system is the modern one? :-))</p>     */    public static final long EPOCH_DIFF = 11644473600000L;    /**     * <p>Converts a Windows FILETIME into a {@link Date}. The Windows     * FILETIME structure holds a date and time associated with a     * file. The structure identifies a 64-bit integer specifying the     * number of 100-nanosecond intervals which have passed since     * January 1, 1601. This 64-bit value is split into the two double     * words stored in the structure.</p>     *     * @param high The higher double word of the FILETIME structure.     * @param low The lower double word of the FILETIME structure.     * @return The Windows FILETIME as a {@link Date}.     */    public static Date filetimeToDate(final int high, final int low)    {        final long filetime = ((long) high) << 32 | (low & 0xffffffffL);        final long ms_since_16010101 = filetime / (1000 * 10);        final long ms_since_19700101 = ms_since_16010101 - EPOCH_DIFF;        return new Date(ms_since_19700101);    }    /**     * <p>Converts a {@link Date} into a filetime.</p>     *     * @param date The date to be converted     * @return The filetime     *      * @see #filetimeToDate     */    public static long dateToFileTime(final Date date)    {        long ms_since_19700101 = date.getTime();        long ms_since_16010101 = ms_since_19700101 + EPOCH_DIFF;        return ms_since_16010101 * (1000 * 10);    }    /**     * <p>Checks whether two collections are equal. Two collections     * C<sub>1</sub> and C<sub>2</sub> are equal, if the following conditions     * are true:</p>     *     * <ul>     *     * <li><p>For each c<sub>1<em>i</em></sub> (element of C<sub>1</sub>) there     * is a c<sub>2<em>j</em></sub> (element of C<sub>2</sub>), and     * c<sub>1<em>i</em></sub> equals c<sub>2<em>j</em></sub>.</p></li>     *     * <li><p>For each c<sub>2<em>i</em></sub> (element of C<sub>2</sub>) there     * is a c<sub>1<em>j</em></sub> (element of C<sub>1</sub>) and     * c<sub>2<em>i</em></sub> equals c<sub>1<em>j</em></sub>.</p></li>     *     * </ul>     *     * @param c1 the first collection     * @param c2 the second collection     * @return <code>true</code> if the collections are equal, else     * <code>false</code>.     */    public static boolean equals(final Collection c1, final Collection c2)    {        final Object[] o1 = c1.toArray();        final Object[] o2 = c2.toArray();        return internalEquals(o1, o2);    }    /**     * <p>Compares to object arrays with regarding the objects' order. For     * example, [1, 2, 3] and [2, 1, 3] are equal.</p>     *     * @param c1 The first object array.     * @param c2 The second object array.     * @return <code>true</code> if the object arrays are equal,     * <code>false</code> if they are not.     */    public static boolean equals(final Object[] c1, final Object[] c2)    {        final Object[] o1 = (Object[]) c1.clone();        final Object[] o2 = (Object[]) c2.clone();        return internalEquals(o1, o2);    }    private static boolean internalEquals(final Object[] o1, final Object[] o2)    {        for (int i1 = 0; i1 < o1.length; i1++)        {            final Object obj1 = o1[i1];            boolean matchFound = false;            for (int i2 = 0; !matchFound && i2 < o1.length; i2++)            {                final Object obj2 = o2[i2];                if (obj1.equals(obj2))                {                    matchFound = true;                    o2[i2] = null;                }            }            if (!matchFound)                return false;        }        return true;    }    /**     * <p>Pads a byte array with 0x00 bytes so that its length is a multiple of     * 4.</p>     *     * @param ba The byte array to pad.     * @return The padded byte array.     */    public static byte[] pad4(final byte[] ba)    {        final int PAD = 4;        final byte[] result;        int l = ba.length % PAD;        if (l == 0)            result = ba;        else        {            l = PAD - l;            result = new byte[ba.length + l];            System.arraycopy(ba, 0, result, 0, ba.length);        }        return result;    }    /**     * <p>Pads a character array with 0x0000 characters so that its length is a     * multiple of 4.</p>     *     * @param ca The character array to pad.     * @return The padded character array.     */    public static char[] pad4(final char[] ca)    {        final int PAD = 4;        final char[] result;        int l = ca.length % PAD;        if (l == 0)            result = ca;        else        {            l = PAD - l;            result = new char[ca.length + l];            System.arraycopy(ca, 0, result, 0, ca.length);        }        return result;    }    /**     * <p>Pads a string with 0x0000 characters so that its length is a     * multiple of 4.</p>     *     * @param s The string to pad.     * @return The padded string as a character array.     */    public static char[] pad4(final String s)    {        return pad4(s.toCharArray());    }    /**     * <p>Returns a textual representation of a {@link Throwable}, including a     * stacktrace.</p>     *      * @param t The {@link Throwable}     *      * @return a string containing the output of a call to     * <code>t.printStacktrace()</code>.     */    public static String toString(final Throwable t)    {        final StringWriter sw = new StringWriter();        final PrintWriter pw = new PrintWriter(sw);        t.printStackTrace(pw);        pw.close();        try        {            sw.close();            return sw.toString();        }        catch (IOException e)        {            final StringBuffer b = new StringBuffer(t.getMessage());            b.append("\n");            b.append("Could not create a stacktrace. Reason: ");            b.append(e.getMessage());            return b.toString();        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩成人综合在线一区二区| 亚洲美女屁股眼交| 亚洲成人av一区二区| 亚洲一区二区不卡免费| 欧美三级欧美一级| 国产麻豆日韩欧美久久| 国产精品区一区二区三| 久久在线免费观看| 中文字幕在线一区免费| 欧美艳星brazzers| 久久精品国产在热久久| 亚洲五码中文字幕| 久久女同精品一区二区| 91黄色免费版| 老色鬼精品视频在线观看播放| 久久精品亚洲麻豆av一区二区| 欧美日韩国产天堂| 欧美亚洲丝袜传媒另类| 国产成人综合自拍| 国产精品三级视频| 顶级嫩模精品视频在线看| 亚洲天堂精品在线观看| 国产亚洲一区二区在线观看| 久久久久久**毛片大全| 久久精品男人天堂av| 337p粉嫩大胆噜噜噜噜噜91av| 4hu四虎永久在线影院成人| 欧美日韩在线一区二区| 在线视频亚洲一区| 911精品产国品一二三产区| 国产精品一区不卡| av爱爱亚洲一区| 99国产精品久| 成人黄色小视频在线观看| jizzjizzjizz欧美| 国产一区三区三区| 成人av动漫网站| 欧美日韩大陆在线| 亚洲精品在线三区| 欧美在线色视频| 日韩欧美aaaaaa| 亚洲精品久久嫩草网站秘色| 国产精品天干天干在线综合| 日韩精品1区2区3区| 色婷婷亚洲综合| 日韩三级免费观看| 久久精品亚洲精品国产欧美| 精品一区二区综合| 久久一区二区三区四区| 不卡av电影在线播放| 自拍偷拍国产精品| 欧美日韩一区二区三区高清 | 一区二区高清在线| 在线精品视频免费播放| 亚洲成av人片观看| 国产欧美一区二区在线观看| 色综合天天综合网国产成人综合天| 日韩成人免费电影| 精品伦理精品一区| 韩国成人精品a∨在线观看| 国产亚洲精品bt天堂精选| 日本一区中文字幕| 图片区小说区区亚洲影院| 国产老女人精品毛片久久| 一区二区三区中文字幕电影| 91精品综合久久久久久| 成人免费视频一区二区| 欧美精品tushy高清| 国产精品996| 精品一区二区国语对白| 国产91丝袜在线观看| 国产精品资源站在线| 成人黄色a**站在线观看| 91在线观看地址| 色婷婷久久99综合精品jk白丝| 97se亚洲国产综合自在线| 色国产精品一区在线观看| 欧美一区二区三区视频免费| 欧美成人官网二区| 中文字幕在线不卡一区 | 亚洲福中文字幕伊人影院| 久久综合网色—综合色88| 日韩视频免费观看高清完整版在线观看| 欧美日韩专区在线| 日韩精品一区二区在线| 国产欧美1区2区3区| 亚洲精品亚洲人成人网| 国产精品成人免费精品自在线观看| 欧美伊人久久久久久久久影院 | 欧美精品18+| 丝袜美腿亚洲综合| 亚洲一区二区三区小说| 日韩av电影免费观看高清完整版在线观看| 久久精品久久精品| 91麻豆国产在线观看| 欧美撒尿777hd撒尿| 欧美日韩一区二区三区不卡| 在线免费观看日韩欧美| 9l国产精品久久久久麻豆| 国产精品一级在线| 粉嫩aⅴ一区二区三区四区| 成人精品国产福利| 一本到高清视频免费精品| 欧美日韩国产免费| 成人免费视频一区二区| 在线观看国产精品网站| 国产三级一区二区三区| 久久国内精品自在自线400部| 99久久99久久精品免费观看| 精品理论电影在线| 日韩精品一二三| 91麻豆精品一区二区三区| 久久亚洲免费视频| 日韩国产在线一| 色激情天天射综合网| 中文成人综合网| av午夜一区麻豆| proumb性欧美在线观看| 波多野结衣中文字幕一区二区三区 | 久久综合丝袜日本网| 久久久99精品久久| 欧美一区二区三区四区五区| 精品国产麻豆免费人成网站| 亚洲一区二区三区自拍| 色婷婷av久久久久久久| 亚洲色图另类专区| 欧美日韩一级黄| 日本欧美大码aⅴ在线播放| 亚洲欧美日韩一区二区三区在线观看 | 欧美视频自拍偷拍| 亚洲欧美中日韩| 欧美嫩在线观看| 亚洲少妇最新在线视频| 欧美高清dvd| 高清不卡一区二区| 亚洲一级不卡视频| 欧美大白屁股肥臀xxxxxx| 日韩电影在线一区| 国产精品乱码久久久久久| 91网页版在线| 国产欧美一区二区精品忘忧草 | 欧美一区在线视频| 国产很黄免费观看久久| 一区二区三区日韩欧美精品| 久久日韩精品一区二区五区| 国产69精品久久99不卡| 午夜精品免费在线| 中文字幕欧美一区| 欧美成人一区二区三区在线观看 | 日韩欧美国产系列| 九九九久久久精品| 亚洲综合色网站| 欧美电影免费提供在线观看| 国精品**一区二区三区在线蜜桃| 久久久噜噜噜久久中文字幕色伊伊| jizzjizzjizz欧美| 青青草原综合久久大伊人精品优势| 亚洲欧洲另类国产综合| 久久影音资源网| 91精品在线一区二区| 777xxx欧美| 色婷婷综合久色| 欧美精选一区二区| 极品少妇一区二区三区精品视频| 亚洲国产裸拍裸体视频在线观看乱了| 亚洲18色成人| 久久精品国产**网站演员| 成人高清视频在线| 在线播放视频一区| 欧美国产日韩一二三区| 一区二区三区欧美亚洲| 亚洲成国产人片在线观看| 奇米色777欧美一区二区| 精品一区二区在线播放| 国产成人av一区| 欧美日韩国产一二三| 欧美大尺度电影在线| 亚洲美女在线国产| 韩国女主播成人在线观看| 国产精品66部| 久久久美女毛片| 欧美精品一区二区三区蜜桃视频| 欧美亚洲精品一区| 国产精品久久午夜夜伦鲁鲁| 久久成人麻豆午夜电影| 色婷婷香蕉在线一区二区| 久久嫩草精品久久久久| 日韩福利视频网| 欧美性一级生活| 亚洲综合一二区| 91免费版pro下载短视频| 久久综合av免费| 国精产品一区一区三区mba视频| 欧美另类videos死尸| 亚洲一区二区三区影院| 欧洲一区二区av| 亚洲香肠在线观看| 色综合色狠狠综合色| 亚洲欧美激情在线| 国产在线精品一区二区夜色|