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

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

?? stringconverter.java

?? 用于數據庫數據潛移
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* Copyright (c) 1995-2000, The Hypersonic SQL Group.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice, this
 * list of conditions and the following disclaimer.
 *
 * 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.
 *
 * Neither the name of the Hypersonic SQL Group nor the names of its
 * contributors may be used to endorse or promote products derived from this
 * software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS 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 THE HYPERSONIC SQL GROUP,
 * OR 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 the Hypersonic SQL Group.
 *
 *
 * For work added by the HSQL Development Group:
 *
 * Copyright (c) 2001-2005, The HSQL Development Group
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice, this
 * list of conditions and the following disclaimer.
 *
 * 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.
 *
 * Neither the name of the HSQL Development Group nor the names of its
 * contributors may be used to endorse or promote products derived from this
 * software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS 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 HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
 * OR 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.
 */


package org.hsqldb.lib;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;import java.io.StringWriter;import java.io.UTFDataFormatException;/** * Collection of static methods for converting strings between different * formats and to and from byte arrays.<p> * * New class, with extensively enhanced and rewritten Hypersonic code. * * @author Thomas Mueller (Hypersonic SQL Group) * @author fredt@users * @version 1.8.0 * @since 1.7.2 */// fredt@users 20020328 - patch 1.7.0 by fredt - error trappingpublic class StringConverter {    private static final byte[] HEXBYTES = {        (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4',        (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9',        (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f'    };    private static final String HEXINDEX = "0123456789abcdef0123456789ABCDEF";    /**     * Converts a String into a byte array by using a big-endian two byte     * representation of each char value in the string.     */    byte[] stringToFullByteArray(String s) {        int    length = s.length();        byte[] buffer = new byte[length * 2];        int    c;        for (int i = 0; i < length; i++) {            c                 = s.charAt(i);            buffer[i * 2]     = (byte) ((c & 0x0000ff00) >> 8);            buffer[i * 2 + 1] = (byte) (c & 0x000000ff);        }        return buffer;    }    /**     * Compacts a hexadecimal string into a byte array     *     *     * @param s hexadecimal string     *     * @return byte array for the hex string     * @throws IOException     */    public static byte[] hexToByte(String s) throws IOException {        int    l    = s.length() / 2;        byte[] data = new byte[l];        int    j    = 0;        if (s.length() % 2 != 0) {            throw new IOException(                "hexadecimal string with odd number of characters");        }        for (int i = 0; i < l; i++) {            char c = s.charAt(j++);            int  n, b;            n = HEXINDEX.indexOf(c);            if (n == -1) {                throw new IOException(                    "hexadecimal string contains non hex character");            }            b       = (n & 0xf) << 4;            c       = s.charAt(j++);            n       = HEXINDEX.indexOf(c);            b       += (n & 0xf);            data[i] = (byte) b;        }        return data;    }    /**     * Converts a byte array into a hexadecimal string     *     *     * @param b byte array     *     * @return hex string     */    public static String byteToHex(byte[] b) {        int    len = b.length;        char[] s   = new char[len * 2];        for (int i = 0, j = 0; i < len; i++) {            int c = ((int) b[i]) & 0xff;            s[j++] = (char) HEXBYTES[c >> 4 & 0xf];            s[j++] = (char) HEXBYTES[c & 0xf];        }        return new String(s);    }    /**     * Converts a byte array into hexadecimal characters     * which are written as ASCII to the given output stream.     *     * @param o output stream     * @param b byte array     */    public static void writeHex(byte[] o, int from, byte[] b) {        int len = b.length;        for (int i = 0; i < len; i++) {            int c = ((int) b[i]) & 0xff;            o[from++] = HEXBYTES[c >> 4 & 0xf];            o[from++] = HEXBYTES[c & 0xf];        }    }    public static String byteToString(byte[] b, String charset) {        try {            return (charset == null) ? new String(b)                                     : new String(b, charset);        } catch (Exception e) {}        return null;    }    /**     * Converts a Unicode string into UTF8 then convert into a hex string     *     *     * @param s normal Unicode string     *     * @return hex string representation of UTF8 encoding of the input     */    public static String unicodeToHexString(String s) {        HsqlByteArrayOutputStream bout = new HsqlByteArrayOutputStream();        writeUTF(s, bout);        return byteToHex(bout.toByteArray());    }// fredt@users 20011120 - patch 450455 by kibu@users - modified// method return type changed to HsqlStringBuffer with spare// space for end-of-line characters -- to reduce String concatenation    /**     * Hsqldb specific encoding used only for log files.     *     * The SQL statements that need to be written to the log file (input) are     * Java Unicode strings. input is converted into a 7bit escaped ASCII     * string (output)with the following transformations.     * All characters outside the 0x20-7f range are converted to a     * escape sequence and added to output.     * If a backslash character is immdediately followed by 'u', the     * backslash character is converted to escape sequence and     * added to output.     * All the remaining characters in input are added to output without     * conversion.     *     * The escape sequence is backslash, letter u, xxxx, where xxxx     * is the hex representation of the character code.     * (fredt@users)     *     * @param b output stream to wite to     * @param s Java Unicode string     *     * @return number of bytes written out     *     */    public static int unicodeToAscii(HsqlByteArrayOutputStream b, String s,                                     boolean doubleSingleQuotes) {        int count = 0;        if ((s == null) || (s.length() == 0)) {            return 0;        }        int len = s.length();        for (int i = 0; i < len; i++) {            char c = s.charAt(i);            if (c == '\\') {                if ((i < len - 1) && (s.charAt(i + 1) == 'u')) {                    b.write(c);    // encode the \ as unicode, so 'u' is ignored                    b.write('u');                    b.write('0');                    b.write('0');                    b.write('5');                    b.write('c');                    count += 6;                } else {                    b.write(c);                    count++;                }            } else if ((c >= 0x0020) && (c <= 0x007f)) {                b.write(c);        // this is 99%                count++;                if (c == '\'' && doubleSingleQuotes) {                    b.write(c);                    count++;                }            } else {                b.write('\\');                b.write('u');                b.write(HEXBYTES[(c >> 12) & 0xf]);                b.write(HEXBYTES[(c >> 8) & 0xf]);                b.write(HEXBYTES[(c >> 4) & 0xf]);                b.write(HEXBYTES[c & 0xf]);                count += 6;            }        }        return count;    }// fredt@users 20020522 - fix for 557510 - backslash bug// this legacy bug resulted from forward reading the input when a backslash// was present and manifested itself when a backslash was followed// immdediately by a character outside the 0x20-7f range in a database field.    /**     * Hsqldb specific decoding used only for log files.     *     * This method converts the 7 bit escaped ASCII strings in a log file     * back into Java Unicode strings. See unicodeToAccii() above,     *     * @param s encoded ASCII string in byte array     * @param offset position of first byte     * @param length number of bytes to use

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品人成在线观看免费| 欧美日韩视频在线第一区| 欧美日韩国产小视频在线观看| 国产成人综合在线| 国产三级一区二区| 国产xxx精品视频大全| jvid福利写真一区二区三区| 国产精品久久久久久亚洲伦| 日韩中文字幕区一区有砖一区| 91丨porny丨国产入口| 亚洲视频一区在线| 色婷婷香蕉在线一区二区| 国产精品理论片| 91免费精品国自产拍在线不卡| 亚洲人成影院在线观看| 国产成人自拍在线| 亚洲高清视频中文字幕| 精品999在线播放| 91美女精品福利| 免费观看成人av| 国产精品午夜在线| 在线影视一区二区三区| 免费国产亚洲视频| 亚洲欧美在线另类| 欧美成人精品高清在线播放| 99精品视频在线观看免费| 亚洲第一福利一区| 国产精品久久久久久户外露出| 色88888久久久久久影院野外| 蜜臀av亚洲一区中文字幕| 亚洲三级在线观看| 国产午夜精品福利| 欧美一激情一区二区三区| 色呦呦日韩精品| 成人国产精品免费观看视频| 久久99国产精品麻豆| 亚洲国产综合在线| 亚洲视频一区在线| 亚洲欧洲国产日韩| 国产女主播视频一区二区| 久久影音资源网| 26uuu亚洲综合色欧美| 欧美一级二级三级乱码| 欧美丰满高潮xxxx喷水动漫| 色婷婷久久一区二区三区麻豆| 成人久久久精品乱码一区二区三区| 老司机精品视频一区二区三区| 亚洲国产精品嫩草影院| 亚洲午夜久久久久久久久电影网 | 亚洲国产精品久久艾草纯爱| 亚洲免费观看视频| 一区二区三区久久久| 午夜精品成人在线| 久久这里都是精品| 中文字幕日韩精品一区| 国产亚洲精品aa| 2023国产精品自拍| 欧美国产精品一区| 亚洲三级在线看| 五月天精品一区二区三区| 免费人成精品欧美精品| 日本成人超碰在线观看| 蜜臀a∨国产成人精品| 精品一区二区三区香蕉蜜桃| 激情欧美日韩一区二区| 97se亚洲国产综合自在线 | 老色鬼精品视频在线观看播放| 久久99国内精品| 99久久久免费精品国产一区二区| 欧美日韩中文字幕精品| 91精品国产综合久久国产大片| 日韩精品一区二区三区三区免费| 欧美极品aⅴ影院| 日本女人一区二区三区| 成人久久18免费网站麻豆| 欧美一区二区福利在线| 欧美激情中文字幕一区二区| 亚洲成av人影院| 国产精品一卡二| 精品视频一区三区九区| 久久影院视频免费| 日本va欧美va欧美va精品| 成人黄色777网| 国产无遮挡一区二区三区毛片日本| 亚洲国产日韩精品| 色婷婷综合五月| 综合激情网...| 成人av在线资源网| 综合中文字幕亚洲| 国产成人精品免费视频网站| 欧美精品一区二区三区视频| 亚洲人吸女人奶水| 成人午夜av在线| 国产日韩欧美一区二区三区综合| 免费一区二区视频| 精品久久久久99| 国内久久婷婷综合| 2022国产精品视频| 国产精品一区二区三区99| 国产午夜精品理论片a级大结局 | 国产精品69毛片高清亚洲| 精品999在线播放| 国产精品亚洲综合一区在线观看| 国产精品日日摸夜夜摸av| 成人av在线电影| 亚洲欧洲精品一区二区三区不卡 | 国模一区二区三区白浆| 久久精品在这里| 91日韩在线专区| 中文字幕一区二区不卡| 欧美伊人久久久久久久久影院| 亚洲va韩国va欧美va精品| 91久久一区二区| 亚洲成av人**亚洲成av**| 欧美一区二区视频在线观看| 国产不卡视频一区二区三区| 亚洲午夜一二三区视频| 国产日韩一级二级三级| 91在线观看成人| 亚洲国产va精品久久久不卡综合 | 99riav久久精品riav| 日韩在线一二三区| 亚洲欧美电影一区二区| 久久久久88色偷偷免费| 欧美精三区欧美精三区| 国产成人精品三级| 日本午夜一区二区| 一区二区三区久久| 香蕉av福利精品导航| 国产精品久久久久影视| 日韩精品一区二区三区老鸭窝 | 国产大陆a不卡| 九九热在线视频观看这里只有精品| 亚洲青青青在线视频| 国产精品天干天干在线综合| 精品国产乱码久久久久久影片| 欧美日韩不卡在线| 欧美亚日韩国产aⅴ精品中极品| 成人激情免费视频| 粉嫩嫩av羞羞动漫久久久| 热久久久久久久| 欧美a级理论片| 日本三级亚洲精品| 日韩在线观看一区二区| a美女胸又www黄视频久久| 成人三级在线视频| av资源网一区| 色av成人天堂桃色av| 精品1区2区3区| 欧美挠脚心视频网站| 欧美一级片免费看| 久久精品一区二区三区四区| 国产欧美日韩视频一区二区| 国产精品色噜噜| 亚洲一区二区三区四区中文字幕| 亚洲综合精品久久| 毛片av一区二区| 色拍拍在线精品视频8848| 欧美日韩色一区| 亚洲国产精品精华液2区45| 亚洲高清久久久| 国产精品一区二区在线播放| 一本久道中文字幕精品亚洲嫩| 欧美高清你懂得| 国产午夜精品在线观看| 亚洲综合成人网| 成人性视频网站| 这里是久久伊人| 在线观看一区二区视频| 日韩一区二区三区四区| 中文字幕中文字幕一区二区| 日日夜夜精品视频免费| proumb性欧美在线观看| 精品少妇一区二区三区日产乱码 | 成人黄色大片在线观看| 欧美一卡二卡在线| 日本一区二区在线不卡| 免费成人在线网站| 欧美午夜影院一区| 久久99深爱久久99精品| 99视频一区二区| 精品福利av导航| 久久精品二区亚洲w码| 欧美日韩在线一区二区| 亚洲狠狠丁香婷婷综合久久久| 国产成人一区在线| 日韩欧美区一区二| 奇米影视一区二区三区小说| 日韩一区二区影院| 日本不卡免费在线视频| 精品视频999| 免费看欧美美女黄的网站| 91麻豆精品国产91久久久久久| 午夜精品aaa| 欧美美女bb生活片| 无码av中文一区二区三区桃花岛| 欧美日韩精品一区二区三区| 亚洲妇女屁股眼交7| 欧美无乱码久久久免费午夜一区| 亚洲国产视频在线|