⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fiblonghandler.java

📁 抽取pdf和word文本内容的源代码
💻 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.hwpf.model;import java.io.IOException;import org.apache.poi.util.LittleEndian;import org.apache.poi.hwpf.model.io.HWPFOutputStream;public class FIBLongHandler{  public static final int CBMAC = 0;  public static final int PRODUCTCREATED = 1;  public static final int PRODUCTREVISED = 2;  public static final int CCPTEXT = 3;  public static final int CCPFTN = 4;  public static final int CCPHDD = 5;  public static final int CCPMCR = 6;  public static final int CCPATN = 7;  public static final int CCPEDN = 8;  public static final int CCPTXBX = 9;  public static final int CCPHDRTXBX = 10;  public static final int PNFBPCHPFIRST = 11;  public static final int PNCHPFIRST = 12;  public static final int CPNBTECHP = 13;  public static final int PNFBPPAPFIRST = 14;  public static final int PNPAPFIRST = 15;  public static final int CPNBTEPAP = 16;  public static final int PNFBPLVCFIRST = 17;  public static final int PNLVCFIRST = 18;  public static final int CPNBTELVC = 19;  public static final int FCISLANDFIRST = 20;  public static final int FCISLANDLIM = 21;  int[] _longs;  public FIBLongHandler(byte[] mainStream, int offset)  {    int longCount = LittleEndian.getShort(mainStream, offset);    offset += LittleEndian.SHORT_SIZE;    _longs = new int[longCount];    for (int x = 0; x < longCount; x++)    {      _longs[x] = LittleEndian.getInt(mainStream, offset + (x * LittleEndian.INT_SIZE));    }  }  /**   * Refers to a 32 bit windows "long" same as a Java int   * @param longCode   * @return   */  public int getLong(int longCode)  {    return _longs[longCode];  }  public void setLong(int longCode, int value)  {    _longs[longCode] = value;  }  void serialize(byte[] mainStream, int offset)    throws IOException  {    LittleEndian.putShort(mainStream, offset, (short)_longs.length);    offset += LittleEndian.SHORT_SIZE;    for (int x = 0; x < _longs.length; x++)    {      LittleEndian.putInt(mainStream, offset, _longs[x]);      offset += LittleEndian.INT_SIZE;    }  }  int sizeInBytes()  {    return (_longs.length * LittleEndian.INT_SIZE) + LittleEndian.SHORT_SIZE;  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -