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

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

?? sstrecord.java

?? java開發文檔之excel:jexcelapi_2_6_3.tar
?? JAVA
字號:
/***********************************************************************      Copyright (C) 2002 Andrew Khan** 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 jxl.read.biff;import common.Assert;import jxl.WorkbookSettings;import jxl.biff.IntegerHelper;import jxl.biff.RecordData;import jxl.biff.StringHelper;/** * Holds all the strings in the shared string table */class SSTRecord extends RecordData{  /**   * The total number of strings in this table   */  private int totalStrings;  /**   * The number of unique strings   */  private int uniqueStrings;  /**   * The shared strings   */  private String[] strings;  /**   * The array of continuation breaks   */  private int[] continuationBreaks;  /**   * A holder for a byte array   */  private static class ByteArrayHolder  {    /**     * the byte holder     */    public byte[] bytes;  }  /**   * A holder for a boolean   */  private static class BooleanHolder  {    /**     * the holder holder     */    public boolean value;  }  /**   * Constructs this object from the raw data   *   * @param t the raw data   * @param continuations the continuations   * @param ws the workbook settings   */  public SSTRecord(Record t, Record[] continuations, WorkbookSettings ws)  {    super(t);    // If a continue record appears in the middle of    // a string, then the encoding character is repeated    // Concatenate everything into one big bugger of a byte array    int totalRecordLength = 0;    for (int i = 0; i < continuations.length; i++)    {      totalRecordLength += continuations[i].getLength();    }    totalRecordLength += getRecord().getLength();    byte[] data = new byte[totalRecordLength];    // First the original data gets put in    int pos = 0;    System.arraycopy(getRecord().getData(), 0,                     data, 0, getRecord().getLength());    pos += getRecord().getLength();    // Now copy in everything else.    continuationBreaks = new int[continuations.length];    Record r = null;    for (int i = 0; i < continuations.length; i++)    {      r = continuations[i];      System.arraycopy(r.getData(), 0,                       data, pos,                       r.getLength());      continuationBreaks[i] = pos;      pos += r.getLength();    }    totalStrings = IntegerHelper.getInt(data[0], data[1],                                        data[2], data[3]);    uniqueStrings = IntegerHelper.getInt(data[4], data[5],                                         data[6], data[7]);    strings = new String[uniqueStrings];    readStrings(data, 8, ws);  }  /**   * Reads in all the strings from the raw data   *   * @param data the raw data   * @param offset the offset   * @param ws the workbook settings   */  private void readStrings(byte[] data, int offset, WorkbookSettings ws)  {    int pos = offset;    int numChars;    byte optionFlags;    String s = null;    boolean asciiEncoding = false;    boolean richString = false;    boolean extendedString = false;    int formattingRuns = 0;    int extendedRunLength = 0;    for (int i = 0; i < uniqueStrings; i++)    {      // Read in the number of characters      numChars = IntegerHelper.getInt(data[pos], data[pos + 1]);      pos += 2;      optionFlags = data[pos];      pos++;      // See if it is an extended string      extendedString = ((optionFlags & 0x04) != 0);      // See if string contains formatting information      richString = ((optionFlags & 0x08) != 0);      if (richString)      {        // Read in the crun        formattingRuns = IntegerHelper.getInt(data[pos], data[pos + 1]);        pos += 2;      }      if (extendedString)      {        // Read in cchExtRst        extendedRunLength = IntegerHelper.getInt          (data[pos], data[pos + 1], data[pos + 2], data[pos + 3]);        pos += 4;      }      // See if string is ASCII (compressed) or unicode      asciiEncoding = ((optionFlags & 0x01) == 0);      ByteArrayHolder bah = new ByteArrayHolder();      BooleanHolder   bh = new BooleanHolder();      bh.value = asciiEncoding;      pos += getChars(data, bah, pos, bh, numChars);      asciiEncoding = bh.value;      if (asciiEncoding)      {        s = StringHelper.getString(bah.bytes, numChars, 0, ws);      }      else      {        s = StringHelper.getUnicodeString(bah.bytes, numChars, 0);      }      strings[i] = s;      // For rich strings, skip over the formatting runs      if (richString)      {        pos += 4 * formattingRuns;      }      // For extended strings, skip over the extended string data      if (extendedString)      {        pos += extendedRunLength;      }      if (pos > data.length)      {        Assert.verify(false, "pos exceeds record length");      }    }  }  /**   * Gets the chars in the ascii array, taking into account continuation   * breaks   *   * @param source the original source   * @param bah holder for the new byte array   * @param pos the current position in the source   * @param ascii holder for a return ascii flag   * @param numChars the number of chars in the string   * @return the number of bytes read from the source   */  private int getChars(byte[] source,                       ByteArrayHolder bah,                       int pos,                       BooleanHolder ascii,                       int numChars)  {    int i = 0;    boolean spansBreak = false;    if (ascii.value)    {      bah.bytes = new byte[numChars];    }    else    {      bah.bytes = new byte[numChars * 2];    }    while (i < continuationBreaks.length && !spansBreak)    {      spansBreak = pos <= continuationBreaks[i] &&                   (pos + bah.bytes.length > continuationBreaks[i]);      if (!spansBreak)      {        i++;      }    }    // If it doesn't span a break simply do an array copy into the    // destination array and finish    if (!spansBreak)    {      System.arraycopy(source, pos, bah.bytes, 0, bah.bytes.length);      return bah.bytes.length;    }    // Copy the portion before the break pos into the array    int breakpos = continuationBreaks[i];    System.arraycopy(source, pos, bah.bytes, 0, breakpos - pos);    int bytesRead = breakpos - pos;    int charsRead;    if (ascii.value)    {      charsRead = bytesRead;    }    else    {      charsRead = bytesRead / 2;    }    bytesRead += getContinuedString(source,                                    bah,                                    bytesRead,                                    i,                                    ascii,                                    numChars - charsRead);    return bytesRead;  }  /**   * Gets the rest of the string after a continuation break   *   * @param source the original bytes   * @param bah the holder for the new bytes   * @param destPos the des pos   * @param contBreakIndex the index of the continuation break   * @param ascii the ascii flag holder   * @param charsLeft the number of chars left in the array   * @return the number of bytes read in the continued string   */  private int getContinuedString(byte[] source,                                 ByteArrayHolder bah,                                 int destPos,                                 int contBreakIndex,                                 BooleanHolder ascii,                                 int charsLeft)  {    int breakpos = continuationBreaks[contBreakIndex];    int bytesRead = 0;    while (charsLeft > 0)    {      Assert.verify(contBreakIndex < continuationBreaks.length,                    "continuation break index");      if (ascii.value && source[breakpos] == 0)      {        // The string is consistently ascii throughout        int length = contBreakIndex == continuationBreaks.length - 1 ?          charsLeft :          Math.min            (charsLeft,             continuationBreaks[contBreakIndex + 1] - breakpos - 1);        System.arraycopy(source,                         breakpos + 1,                         bah.bytes,                         destPos,                         length);        destPos   += length;        bytesRead += length + 1;        charsLeft -= length;        ascii.value = true;      }      else if (!ascii.value && source[breakpos] != 0)      {        // The string is Unicode throughout        int length = contBreakIndex == continuationBreaks.length - 1 ?          charsLeft * 2 :          Math.min            (charsLeft * 2,             continuationBreaks[contBreakIndex + 1] - breakpos - 1);        // It looks like the string continues as Unicode too.  That's handy        System.arraycopy(source,                         breakpos + 1,                         bah.bytes,                         destPos,                         length);        destPos   += length;        bytesRead += length + 1;        charsLeft -= length / 2;        ascii.value = false;      }      else if (!ascii.value && source[breakpos] == 0)      {        // Bummer - the string starts off as Unicode, but after the        // continuation it is in straightforward ASCII encoding        int chars = contBreakIndex == continuationBreaks.length - 1 ?          charsLeft:          Math.min            (charsLeft,             continuationBreaks[contBreakIndex + 1] - breakpos - 1);        for (int j = 0; j < chars; j++)        {          bah.bytes[destPos] = source[breakpos + j + 1];          destPos += 2;        }        bytesRead += chars + 1;        charsLeft -= chars;        ascii.value = false;      }      else      {        // Double Bummer - the string starts off as ASCII, but after the        // continuation it is in Unicode.  This impacts the allocated array        // Reallocate what we have of the byte array so that it is all        // Unicode        byte[] oldBytes = bah.bytes;        bah.bytes = new byte[destPos * 2 + charsLeft * 2];        for (int j = 0; j < destPos; j++)        {          bah.bytes[j * 2] = oldBytes[j];        }        destPos = destPos * 2;        int length = contBreakIndex == continuationBreaks.length - 1 ?          charsLeft * 2 :          Math.min            (charsLeft * 2,             continuationBreaks[contBreakIndex + 1] - breakpos - 1);        System.arraycopy(source,                         breakpos + 1,                         bah.bytes,                         destPos,                         length);        destPos   += length;        bytesRead += length + 1;        charsLeft -= length / 2;        ascii.value = false;      }      contBreakIndex++;      if (contBreakIndex < continuationBreaks.length)      {        breakpos = continuationBreaks[contBreakIndex];      }    }    return bytesRead;  }  /**   * Gets the string at the specified position   *   * @param index the index of the string to return   * @return the strings   */  public String getString(int index)  {    Assert.verify(index < uniqueStrings);    return strings[index];  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91小视频免费观看| 色综合久久99| 日一区二区三区| 精品国产一区二区在线观看| 国产·精品毛片| 午夜精品久久久久久久| 欧美国产一区在线| 91麻豆精品91久久久久久清纯| 国产黄色91视频| 日日骚欧美日韩| 婷婷成人综合网| 婷婷成人激情在线网| 日韩经典中文字幕一区| 日韩精品一区第一页| 日本欧美一区二区| 亚洲免费在线视频| 国产视频一区在线观看| 91麻豆精品国产91久久久久久久久 | 久久综合九色综合97婷婷女人 | 日韩av电影免费观看高清完整版在线观看| 自拍偷拍欧美精品| 日韩一二三区视频| 91国产精品成人| 丁香激情综合国产| 韩国中文字幕2020精品| 丝袜国产日韩另类美女| 日韩中文字幕亚洲一区二区va在线 | 欧美精品一区二区三区很污很色的| 日韩一级高清毛片| 中文字幕免费一区| 亚洲欧美日韩成人高清在线一区| 亚洲123区在线观看| 中文字幕日韩精品一区| 欧美一级生活片| www.爱久久.com| 国产精品一区二区三区四区| 久久99九九99精品| 日韩精品欧美精品| 国内精品免费**视频| 成人午夜免费电影| 欧美日韩亚洲综合在线| 欧美视频一区二区三区| 91黄色在线观看| 精品奇米国产一区二区三区| 精品国产乱码久久久久久1区2区 | 亚洲天堂网中文字| 婷婷久久综合九色综合绿巨人| 国产一区二区三区黄视频| 麻豆成人久久精品二区三区红| 日韩国产一二三区| 国产传媒欧美日韩成人| 欧美视频一区二区在线观看| 精品国产3级a| 亚洲综合小说图片| 亚洲观看高清完整版在线观看| 亚洲一区在线免费观看| 欧美国产日产图区| 亚洲成人av福利| 蜜桃视频在线一区| 国产ts人妖一区二区| 欧美日韩一区二区电影| 国产亚洲午夜高清国产拍精品| 中文字幕一区日韩精品欧美| 麻豆视频一区二区| 一道本成人在线| 久久精品亚洲一区二区三区浴池| 亚洲一区二区三区三| 成人黄色在线网站| 国产精品中文字幕日韩精品| 欧美卡1卡2卡| 精品久久国产97色综合| 国产精品日韩成人| 中文字幕av免费专区久久| 天天av天天翘天天综合网色鬼国产| 成人在线视频首页| 欧美电视剧免费全集观看 | 国产精品动漫网站| 一区二区三区成人在线视频| 日韩专区欧美专区| 日韩欧美亚洲另类制服综合在线| 欧美激情一区二区在线| 日本视频免费一区| 欧美在线不卡一区| 欧美性大战久久久| 国产精品毛片久久久久久久| 国产中文字幕一区| 欧美日韩电影一区| 久久免费精品国产久精品久久久久| 国产精品久久久久影院色老大| 久久国产精品99久久久久久老狼| 成年人网站91| 国产区在线观看成人精品| 亚洲视频1区2区| 丰满少妇久久久久久久| 久久久久久免费网| 国产一区二区主播在线| 日韩免费看网站| 免费成人在线播放| 色婷婷久久99综合精品jk白丝| 国产三级精品视频| 国产精品一区二区果冻传媒| 久久毛片高清国产| 国产成人h网站| 国产欧美日韩综合| 春色校园综合激情亚洲| 久久精品国产久精国产| 国产精品视频你懂的| 99天天综合性| 麻豆精品精品国产自在97香蕉| 欧美国产精品劲爆| 久久久国产精品不卡| 欧亚洲嫩模精品一区三区| 日本vs亚洲vs韩国一区三区二区 | 欧美日韩国产另类不卡| 水蜜桃久久夜色精品一区的特点 | 久久99精品久久久久久国产越南| 6080yy午夜一二三区久久| 亚洲第一搞黄网站| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 91麻豆精品视频| 日韩一区和二区| 56国语精品自产拍在线观看| 奇米精品一区二区三区四区| 亚洲免费在线播放| 国产精品网站在线播放| 日韩视频免费观看高清完整版 | 日韩电影一区二区三区四区| 亚洲精品va在线观看| 色偷偷久久人人79超碰人人澡| 波波电影院一区二区三区| xnxx国产精品| 亚洲超碰97人人做人人爱| 亚洲欧美怡红院| 亚洲成人一区二区| 三级欧美在线一区| 国产一区高清在线| 在线看一区二区| 韩国v欧美v日本v亚洲v| 成人激情黄色小说| 7777精品久久久大香线蕉 | 毛片av中文字幕一区二区| 国产尤物一区二区| 一道本成人在线| 欧美一区二区成人| 国产女主播一区| 日日夜夜精品视频天天综合网| 欧美一区二视频| 日本不卡视频在线观看| 久久er精品视频| 一本久道久久综合中文字幕| 色8久久人人97超碰香蕉987| 精品久久久久av影院| 夜夜亚洲天天久久| 一区二区中文视频| 国产精品久久久久一区二区三区| 亚洲精品久久7777| 国产精品一区专区| 国产亚洲一本大道中文在线| 国模一区二区三区白浆| 91麻豆精品国产自产在线观看一区 | 91丝袜美腿高跟国产极品老师| 亚洲制服丝袜一区| 日韩欧美高清一区| 国产精品福利一区二区三区| 五月激情六月综合| 日本高清不卡视频| 久久久夜色精品亚洲| 亚洲亚洲精品在线观看| www.av亚洲| 午夜视频在线观看一区| 欧美中文字幕亚洲一区二区va在线| 亚洲国产精品综合小说图片区| 日韩三级高清在线| 国产白丝网站精品污在线入口| 国产夜色精品一区二区av| 成人自拍视频在线观看| 夜夜亚洲天天久久| 国产亚洲精品资源在线26u| 久久国产人妖系列| 蜜桃久久精品一区二区| 欧美日韩一区不卡| 麻豆成人91精品二区三区| 欧美精品一区二区三区蜜臀| 日本高清不卡视频| 成人免费黄色在线| 一区二区三区四区乱视频| 在线精品亚洲一区二区不卡| 蜜臀av一区二区三区| 色偷偷久久人人79超碰人人澡 | 日韩一级二级三级| 粉嫩一区二区三区在线看| 午夜精品久久久久久久| 国产免费久久精品| 91麻豆精品国产91久久久| 91在线国产福利| 一本到一区二区三区| 美女性感视频久久| 中文字幕佐山爱一区二区免费| 欧美一二三在线| 91老师片黄在线观看|