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

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

?? indirectobjectfactory.java

?? 處理PDF
?? JAVA
字號:
/*
 * $Id: IndirectObjectFactory.java 3117 2008-01-31 05:53:22Z xlv $
 *
 * Copyright 2007 Bruno Lowagie.
 *
 * 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

package com.lowagie.rups.model;

import java.util.ArrayList;

import com.lowagie.text.pdf.IntHashtable;
import com.lowagie.text.pdf.PdfDictionary;
import com.lowagie.text.pdf.PdfName;
import com.lowagie.text.pdf.PdfNull;
import com.lowagie.text.pdf.PdfObject;
import com.lowagie.text.pdf.PdfReader;

/**
 * A factory that can produce all the indirect objects in a PDF file.
 */
public class IndirectObjectFactory {

	/** The reader object. */
	protected PdfReader reader;
	/** The current xref number. */
	protected int current;
	/** The highest xref number. */
	protected int n;
	/** A list of all the indirect objects in a PDF file. */
	protected ArrayList<PdfObject> objects = new ArrayList<PdfObject>();
	/** Mapping between the index in the objects list and the reference number in the xref table.  */
	protected IntHashtable idxToRef = new IntHashtable();
	/** Mapping between the reference number in the xref table and the index in the objects list .  */
	protected IntHashtable refToIdx = new IntHashtable();
	
	/**
	 * Creates a list that will contain all the indirect objects
	 * in a PDF document. 
	 * @param reader	the reader that will read the PDF document
	 */
	public IndirectObjectFactory(PdfReader reader) {
		this.reader = reader;
		current = -1;
		n = reader.getXrefSize();
	}

	/**
	 * Gets the last object that has been registered.
	 * This method only makes sense while loading the factory.
	 * with loadNextObject().
	 * @return	the number of the last object that was stored
	 */
	public int getCurrent() {
		return current;
	}

	/**
	 * Gets the highest possible object number in the XRef table.
	 * @return	an object number
	 */
	public int getXRefMaximum() {
		return n;
	}

	/**
	 * Stores the next object of the XRef table.
	 * As soon as this method returns false, it makes no longer
	 * sense calling it as all the objects have been stored.
	 * @return	false if there are no objects left to check.
	 */
	public boolean storeNextObject() {
		while (current < n) {
			current++;
			PdfObject object = reader.getPdfObjectRelease(current);
			if (object != null) {
				int idx = size();
				idxToRef.put(idx, current);
				refToIdx.put(current, idx);
				store(object);
				return true;
			}
		}
		return false;
	}
	
	/**
	 * If we store all the objects, we might run out of memory;
	 * that's why we'll only store the objects that are necessary
	 * to construct other objects (for instance the page table).
	 * @param	object	an object we might want to store 
	 */
	private void store(PdfObject object) {
		if (object.isDictionary()){
			PdfDictionary dict = (PdfDictionary)object;
			if (PdfName.PAGE.equals(dict.get(PdfName.TYPE))) {
				objects.add(dict);
				return;
			}
		}
		objects.add(PdfNull.PDFNULL);
	}
	
	/**
	 * Gets the total number of indirect objects in the PDF file.
	 * This isn't necessarily the same number as returned by getXRefMaximum().
	 * The PDF specification allows gaps between object numbers.
	 * @return the total number of indirect objects in the PDF.
	 */
	public int size() {
		return objects.size();
	}
	
	/**
	 * Gets the index of an object based on its number in the xref table.
	 * @param ref	a number in the xref table
	 * @return	the index in the list of indirect objects
	 */
	public int getIndexByRef(int ref) {
		return refToIdx.get(ref);
	}
	
	/**
	 * Gets the reference number in the xref table based on the index in the
	 * indirect object list.
	 * @param i		the index of an object in the indirect object list
	 * @return	the corresponding reference number in the xref table
	 */
	public int getRefByIndex(int i) {
		return idxToRef.get(i);
	}
	
	/**
	 * Gets an object based on its index in the indirect object list.
	 * @param i		an index in the indirect object list	
	 * @return	a PDF object
	 */
	public PdfObject getObjectByIndex(int i) {
		return getObjectByReference(getRefByIndex(i));
	}

	/**
	 * Gets an object based on its reference number in the xref table.
	 * @param ref	a number in the xref table
	 * @return	a PDF object
	 */
	public PdfObject getObjectByReference(int ref) {
		return objects.get(getIndexByRef(ref));
	}
	
	/**
	 * Loads an object based on its reference number in the xref table.
	 * @param ref	a reference number in the xref table.
	 * @return	a PDF object
	 */
	public PdfObject loadObjectByReference(int ref) {
		PdfObject object = getObjectByReference(ref);
		if (object instanceof PdfNull) {
			int idx = getIndexByRef(ref);
			object = reader.getPdfObject(ref);
			objects.set(idx, object);
		}
		return object;
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜电影久久久| 欧美日韩午夜在线| 欧美久久久影院| 国产精品网友自拍| 久久er99精品| 欧美日韩精品是欧美日韩精品| 久久久久亚洲蜜桃| 老汉av免费一区二区三区| 欧美三级电影精品| 亚洲人成精品久久久久久| 国产成人亚洲综合色影视| 日韩亚洲电影在线| 天天综合天天做天天综合| 91在线视频在线| 日本一区二区三区电影| 国产精品综合网| 精品卡一卡二卡三卡四在线| 日本欧美在线观看| 欧美高清hd18日本| 日韩av一区二区三区四区| 欧美日本韩国一区| 五月婷婷久久综合| 欧美色综合网站| 亚洲亚洲人成综合网络| 一本到三区不卡视频| 综合久久综合久久| 色婷婷综合久久久中文字幕| 亚洲四区在线观看| 99re视频精品| 亚洲免费观看视频| 欧美探花视频资源| 午夜成人免费电影| 日韩欧美国产麻豆| 激情小说亚洲一区| 国产欧美日韩久久| 97久久超碰国产精品电影| 亚洲图片另类小说| 欧美中文一区二区三区| 三级一区在线视频先锋| 日韩三级视频中文字幕| 国产麻豆日韩欧美久久| 国产精品污污网站在线观看| www.久久久久久久久| 一级精品视频在线观看宜春院| 91成人网在线| 亚洲gay无套男同| 精品国产91洋老外米糕| 国产成人h网站| 亚洲少妇中出一区| 538在线一区二区精品国产| 极品瑜伽女神91| 国产精品久久影院| 欧美日韩aaaaa| 国产一区二区伦理片| **欧美大码日韩| 欧美美女bb生活片| 国产一区二区三区不卡在线观看| 国产精品卡一卡二| 欧美高清视频不卡网| 国产盗摄一区二区| 亚洲高清免费视频| 国产欧美日韩精品a在线观看| 色爱区综合激月婷婷| 蜜桃视频在线一区| 国产精品美女久久久久久久 | 91成人免费电影| 黄网站免费久久| 亚洲精品日产精品乱码不卡| 日韩一区二区高清| 色综合久久综合| 国产一区二区三区高清播放| 亚洲午夜羞羞片| 国产精品日产欧美久久久久| 欧美猛男gaygay网站| 国产98色在线|日韩| 日韩精品五月天| 中文字幕一区二区三区在线不卡| 欧美一区二区啪啪| 在线视频观看一区| 国产成人免费网站| 麻豆国产91在线播放| 亚洲福利一二三区| 中文字幕在线视频一区| 精品国产一区二区三区忘忧草 | 精品国产乱码久久久久久闺蜜 | 在线一区二区视频| 国产成人在线看| 日本不卡视频在线观看| 成人欧美一区二区三区黑人麻豆 | 91性感美女视频| 国产老女人精品毛片久久| 日韩电影在线观看一区| 亚洲一级二级三级在线免费观看| 中文字幕乱码久久午夜不卡| 91麻豆精品国产| 欧美亚洲动漫制服丝袜| 一本久久a久久免费精品不卡| 成人精品在线视频观看| 国产精品99久久久久久有的能看| 免费国产亚洲视频| 日韩av午夜在线观看| 亚洲成va人在线观看| 亚洲一卡二卡三卡四卡无卡久久 | 亚洲欧美一区二区久久| 国产精品久久久爽爽爽麻豆色哟哟| 日韩精品中文字幕在线一区| 91精品国产乱码久久蜜臀| 欧美区一区二区三区| 欧美日韩在线一区二区| 欧美性一区二区| 欧美日本韩国一区| 91.com视频| 欧美大片顶级少妇| 精品少妇一区二区三区日产乱码| 欧美一级日韩一级| 精品国产91久久久久久久妲己| 日韩一区二区三区视频在线| 日韩一区二区精品在线观看| 精品美女被调教视频大全网站| 精品久久久久久久久久久院品网| 欧美一二三区精品| 久久久久久久久久久久久女国产乱 | 日韩电影在线观看网站| 日韩国产高清在线| 久久精品国产在热久久| 国产一区二区三区久久久| 国产99久久久精品| 99视频一区二区| 在线国产电影不卡| 欧美一区二区久久| 26uuu欧美| 中文字幕一区二| 午夜一区二区三区视频| 毛片av一区二区| 粉嫩一区二区三区性色av| 91亚洲精品久久久蜜桃网站| 欧美三级视频在线| 欧美大片日本大片免费观看| 欧美经典一区二区| 一区二区三区 在线观看视频| 亚洲成av人片一区二区三区| 精品一区二区三区影院在线午夜| 成人午夜又粗又硬又大| 欧美日韩视频在线第一区| 精品电影一区二区| 亚洲天堂精品视频| 另类综合日韩欧美亚洲| heyzo一本久久综合| 欧美肥妇bbw| 中文字幕的久久| 日本不卡的三区四区五区| caoporn国产精品| 正在播放亚洲一区| 中文字幕在线不卡一区| 欧美a级理论片| 色悠悠久久综合| 精品久久五月天| 亚洲成人av在线电影| 国产一区二区免费在线| 欧美日韩综合在线免费观看| 久久综合九色综合97_久久久| 亚洲精品国产品国语在线app| 国产一区二区三区不卡在线观看 | 在线免费不卡电影| 久久亚洲影视婷婷| 偷窥国产亚洲免费视频| 99久久精品国产网站| 日韩美女视频在线| 亚洲高清免费观看 | 国产很黄免费观看久久| 欧美日韩国产一级| 中文字幕在线播放不卡一区| 久久99精品久久久久久久久久久久| 在线日韩av片| 亚洲欧美在线观看| 成人激情视频网站| 久久久午夜精品理论片中文字幕| 亚洲v日本v欧美v久久精品| 99久久精品国产一区| 欧美国产精品久久| 国产精品资源站在线| 日韩精品一区二区在线观看| 亚洲成人资源网| 欧洲中文字幕精品| 亚洲精品va在线观看| 91麻豆精品视频| 亚洲区小说区图片区qvod| 成人一区在线看| 久久品道一品道久久精品| 蜜臀av性久久久久蜜臀aⅴ四虎 | 韩国一区二区在线观看| 欧美一卡在线观看| 日本欧美大码aⅴ在线播放| 欧美挠脚心视频网站| 亚洲成人av免费| 欧美肥胖老妇做爰| 美女视频网站久久| 欧美白人最猛性xxxxx69交| 久久99国产精品久久99果冻传媒| 日韩欧美一区在线观看|