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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? docwriter.java

?? iText可以制作中文PDF文件的JAVA源程序最新版下載
?? JAVA
字號:
/* * $Id: DocWriter.java,v 1.44 2002/11/19 08:33:32 blowagie Exp $ * $Name:  $ * * Copyright 1999, 2000, 2001, 2002 by Bruno Lowagie. * * The contents of this file are subject to the Mozilla Public License Version 1.1 * (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.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the License. * * The Original Code is 'iText, a free JAVA-PDF library'. * * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie. * All Rights Reserved. * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved. * * Contributor(s): all the names of the contributors are added in the source code * where applicable. * * Alternatively, the contents of this file may be used under the terms of the * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the * provisions of LGPL are applicable instead of those above.  If you wish to * allow use of your version of this file only under the terms of the LGPL * License and not to allow others to use your version of this file under * the MPL, indicate your decision by deleting the provisions above and * replace them with the notice and other provisions required by the LGPL. * If you do not delete the provisions above, a recipient may use your version * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE. * * This library is free software; you can redistribute it and/or modify it * under the terms of the MPL as stated above or under the terms of the GNU * Library General Public License as published by the Free Software Foundation; * either version 2 of the License, or 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 Library general Public License for more * details. * * If you didn't download this code from the following link, you should check if * you aren't using an obsolete version: * http://www.lowagie.com/iText/ */package com.lowagie.text;import java.io.BufferedOutputStream;import java.io.OutputStream;import java.io.IOException;import java.util.Iterator;/** * An abstract <CODE>Writer</CODE> class for documents. * <P> * <CODE>DocWriter</CODE> is the abstract class of several writers such * as <CODE>PdfWriter</CODE> and <CODE>HtmlWriter</CODE>. * A <CODE>DocWriter</CODE> can be added as a <CODE>DocListener</CODE> * to a certain <CODE>Document</CODE> by getting an instance (see method * <CODE>getInstance()</CODE> in the specific writer-classes). * Every <CODE>Element</CODE> added to the original <CODE>Document</CODE> * will be written to the <CODE>OutputStream</CODE> of the listening * <CODE>DocWriter</CODE>. * * @see   Document * @see   DocListener */public abstract class DocWriter implements DocListener {/** This is some byte that is often used. */    public static final byte NEWLINE = (byte)'\n';/** This is some byte that is often used. */    public static final byte TAB = (byte)'\t';/** This is some byte that is often used. */    public static final byte LT = (byte)'<';/** This is some byte that is often used. */    public static final byte SPACE = (byte)' ';/** This is some byte that is often used. */    public static final byte EQUALS = (byte)'=';/** This is some byte that is often used. */    public static final byte QUOTE = (byte)'\"';/** This is some byte that is often used. */    public static final byte GT = (byte)'>';/** This is some byte that is often used. */    public static final byte FORWARD = (byte)'/';    // membervariables/** The pageSize. */    protected Rectangle pageSize;/** This is the document that has to be written. */    protected Document document;/** The outputstream of this writer. */    protected BufferedOutputStream os;/** Is the writer open for writing? */    protected boolean open = false;/** Do we have to pause all writing actions? */    protected boolean pause = false;    /** Closes the stream on document close */    protected boolean closeStream = true;    // constructor/** * Constructs a <CODE>DocWriter</CODE>. * * @param document  The <CODE>Document</CODE> that has to be written * @param os  The <CODE>OutputStream</CODE> the writer has to write to. */    protected DocWriter(Document document, OutputStream os)  {        this.document = document;        this.os = new BufferedOutputStream(os);        open = true;    }    // implementation of the DocListener methods/** * Signals that an <CODE>Element</CODE> was added to the <CODE>Document</CODE>. * <P> * This method should be overriden in the specific <CODE>DocWriter<CODE> classes * derived from this abstract class. * * @return  <CODE>false</CODE> * @throws  DocumentException when a document isn't open yet, or has been closed */    public boolean add(Element element) throws DocumentException {        return false;    }/** * Signals that the <CODE>Document</CODE> was opened. */    public void open() {        open = true;    }/** * Sets the pagesize. * * @param pageSize  the new pagesize * @return  a <CODE>boolean</CODE> */    public boolean setPageSize(Rectangle pageSize) {        this.pageSize = pageSize;        return true;    }/** * Sets the <CODE>Watermark</CODE>. * <P> * This method should be overriden in the specific <CODE>DocWriter<CODE> classes * derived from this abstract class if they actually support the use of * a <CODE>Watermark</CODE>. * * @return  <CODE>false</CODE> (because watermarks aren't supported by default). */    public boolean add(Watermark watermark) {        return false;    }/** * Removes the <CODE>Watermark</CODE> (if there is one). */    public void removeWatermark() {    }/** * Sets the margins. * <P> * This does nothing. Has to be overridden if needed. * * @param marginLeft    the margin on the left * @param marginRight   the margin on the right * @param marginTop   the margin on the top * @param marginBottom  the margin on the bottom * @return  <CODE>false</CODE> */    public boolean setMargins(float marginLeft, float marginRight, float marginTop, float marginBottom) {        return false;    }/** * Signals that an new page has to be started. * <P> * This does nothing. Has to be overridden if needed. * * @return  <CODE>true</CODE> if the page was added, <CODE>false</CODE> if not. * @throws  DocumentException when a document isn't open yet, or has been closed */    public boolean newPage() throws DocumentException {        if (!open) {            return false;        }        return true;    }/** * Changes the header of this document. * <P> * This method should be overriden in the specific <CODE>DocWriter<CODE> classes * derived from this abstract class if they actually support the use of * headers. * * @param header    the new header */    public void setHeader(HeaderFooter header) {    }/** * Resets the header of this document. * <P> * This method should be overriden in the specific <CODE>DocWriter<CODE> classes * derived from this abstract class if they actually support the use of * headers. */    public void resetHeader() {    }/** * Changes the footer of this document. * <P> * This method should be overriden in the specific <CODE>DocWriter<CODE> classes * derived from this abstract class if they actually support the use of * footers. * * @param footer    the new footer */    public void setFooter(HeaderFooter footer) {    }/** * Resets the footer of this document. * <P> * This method should be overriden in the specific <CODE>DocWriter<CODE> classes * derived from this abstract class if they actually support the use of * footers. */    public void resetFooter() {    }/** * Sets the page number to 0. * <P> * This method should be overriden in the specific <CODE>DocWriter<CODE> classes * derived from this abstract class if they actually support the use of * pagenumbers. */    public void resetPageCount() {    }/** * Sets the page number. * <P> * This method should be overriden in the specific <CODE>DocWriter<CODE> classes * derived from this abstract class if they actually support the use of * pagenumbers. * * @param pageN   the new page number */    public void setPageCount(int pageN) {    }/** * Signals that the <CODE>Document</CODE> was closed and that no other * <CODE>Elements</CODE> will be added. */    public void close() {        open = false;        try {            os.flush();            if (closeStream)                os.close();        }        catch(IOException ioe) {            throw new ExceptionConverter(ioe);        }    }    // methods/** Converts a <CODE>String</CODE> into a <CODE>Byte</CODE> array * according to the ISO-8859-1 codepage. * @param text the text to be converted * @return the conversion result */    public static final byte[] getISOBytes(String text)    {        if (text == null)            return null;        int len = text.length();        byte b[] = new byte[len];        for (int k = 0; k < len; ++k)            b[k] = (byte)text.charAt(k);        return b;    }/** * Let the writer know that all writing has to be paused. */    public void pause() {        pause = true;    }/** * Let the writer know that writing may be resumed. */    public void resume() {        pause = false;    }/** * Flushes the <CODE>BufferedOutputStream</CODE>. */    public void flush() {        try {            os.flush();        }        catch(IOException ioe) {            throw new ExceptionConverter(ioe);        }    }/** * Writes a <CODE>String</CODE> to the <CODE>OutputStream</CODE>. * * @param string    the <CODE>String</CODE> to write */    protected void write(String string) throws IOException {        os.write(getISOBytes(string));    }/** * Writes a number of tabs. * * @param   indent  the number of tabs to add */    protected void addTabs(int indent) throws IOException {        os.write(NEWLINE);        for (int i = 0; i < indent; i++) {            os.write(TAB);        }    }/** * Writes a key-value pair to the outputstream. * * @param   key     the name of an attribute * @param   value   the value of an attribute */    protected void write(String key, String value)    throws IOException {        os.write(SPACE);        write(key);        os.write(EQUALS);        os.write(QUOTE);        write(value);        os.write(QUOTE);    }/** * Writes a starttag to the outputstream. * * @param   tag     the name of the tag */    protected void writeStart(String tag)    throws IOException {        os.write(LT);        write(tag);    }/** * Writes an endtag to the outputstream. * * @param   tag     the name of the tag */    protected void writeEnd(String tag)    throws IOException {        os.write(LT);        os.write(FORWARD);        write(tag);        os.write(GT);    }/** * Writes an endtag to the outputstream. */    protected void writeEnd()    throws IOException {        os.write(SPACE);        os.write(FORWARD);        os.write(GT);    }/** * Writes the markup attributes of the specified <CODE>MarkupAttributes</CODE> * object to the <CODE>OutputStream</CODE>. * @param mAtt   the <CODE>MarkupAttributes</CODE> to write. */    protected boolean writeMarkupAttributes(MarkupAttributes mAtt)     throws IOException    {      Iterator attributeIterator = mAtt.getMarkupAttributeNames().iterator();      boolean result = attributeIterator.hasNext();      while (attributeIterator.hasNext()) {        String name = String.valueOf(attributeIterator.next());        write(name, mAtt.getMarkupAttribute(name));      }      return result;    }/** * Returns <CODE>true</CODE> if the specified <CODE>Element</CODE> implements * <CODE>MarkupAttributes</CODE> and has one or more attributes to write. * @param element   the <CODE>Element</CODE> to check. * @return <CODE>boolean</CODE>. */    protected static boolean hasMarkupAttributes(Element element) {      return (element instanceof MarkupAttributes &&       !(((MarkupAttributes)element).getMarkupAttributeNames().isEmpty()));    }    /** Checks if the stream is to be closed on document close     * @return true if the stream is closed on documnt close     *     */    public boolean isCloseStream() {        return closeStream;    }        /** Sets the close state of the stream after document close     * @param closeStream true if the stream is close on document close     *     */    public void setCloseStream(boolean closeStream) {        this.closeStream = closeStream;    }    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
aa级大片欧美| 成人精品免费视频| 3d动漫精品啪啪一区二区竹菊| 亚洲精品第1页| 日本黄色一区二区| 亚洲地区一二三色| 日韩欧美激情在线| 精品一区二区三区视频| 久久久久成人黄色影片| 成人免费毛片高清视频| 亚洲美女少妇撒尿| 欧美日韩情趣电影| 久久电影国产免费久久电影| 国产日本欧美一区二区| 91视频com| 午夜av电影一区| wwww国产精品欧美| 99精品黄色片免费大全| 亚洲国产一区二区三区| 欧美变态口味重另类| 丁香六月久久综合狠狠色| 亚洲一区二区精品3399| 日韩美女一区二区三区四区| 国产91露脸合集magnet| 亚洲在线成人精品| xnxx国产精品| 日本乱码高清不卡字幕| 久久99精品久久久| 亚洲精品中文在线| 久久亚洲精品小早川怜子| 91黄色免费版| 国产精品自拍三区| 亚洲成av人片一区二区| 国产日韩欧美一区二区三区综合| 欧洲国产伦久久久久久久| 久久精品国产精品青草| 亚洲综合色噜噜狠狠| 久久美女艺术照精彩视频福利播放| 在线中文字幕一区二区| 国产精品影视网| 日本三级亚洲精品| 亚洲精品少妇30p| 国产日韩精品视频一区| 91精品国产日韩91久久久久久| 91一区在线观看| 国产精品1区2区3区在线观看| 亚洲电影视频在线| 亚洲少妇30p| 久久久久久久综合| 欧美电影精品一区二区| 欧美性受xxxx| 一本一本大道香蕉久在线精品 | 久久蜜桃一区二区| 欧美视频一二三区| 91麻豆国产自产在线观看| 国产在线视频不卡二| 日韩国产欧美视频| 亚洲一区二区三区四区五区中文| 国产精品午夜久久| 久久久久久久av麻豆果冻| 日韩欧美国产高清| 欧美日韩一区高清| 欧美亚洲综合一区| 一本到一区二区三区| 99久久婷婷国产精品综合| 国产二区国产一区在线观看 | 国产一区二区剧情av在线| 日韩在线卡一卡二| 婷婷亚洲久悠悠色悠在线播放 | 性感美女久久精品| 亚洲图片欧美视频| 亚洲一区二区三区爽爽爽爽爽| 国产精品福利在线播放| 国产精品乱码久久久久久| 久久久www免费人成精品| 久久综合色8888| 久久一区二区三区国产精品| 精品国产麻豆免费人成网站| 日韩一级片在线播放| 日韩色视频在线观看| 日韩精品一区二区三区老鸭窝 | 国产成人精品亚洲777人妖| 国产乱码一区二区三区| 国产毛片精品一区| 国产91清纯白嫩初高中在线观看| 国产成人午夜高潮毛片| 9i看片成人免费高清| 色欧美乱欧美15图片| 日本精品一区二区三区高清| 在线观看成人免费视频| 91精品国产麻豆| 久久精品日产第一区二区三区高清版| 久久这里只精品最新地址| 国产日韩一级二级三级| 亚洲日本va午夜在线影院| 一片黄亚洲嫩模| 美女一区二区视频| 国产麻豆精品一区二区| 99re8在线精品视频免费播放| 在线视频你懂得一区二区三区| 777a∨成人精品桃花网| 久久综合色天天久久综合图片| 国产精品女主播在线观看| 一区二区三区美女| 捆绑调教一区二区三区| 国产99久久久精品| 欧美在线色视频| 精品国产欧美一区二区| 国产精品情趣视频| 午夜电影久久久| 丁香桃色午夜亚洲一区二区三区| 在线中文字幕不卡| 精品国产乱码久久久久久久久| 国产精品日韩成人| 日韩精品成人一区二区三区| 国产成人精品免费| 欧美三级日韩三级| 日本一区二区三区久久久久久久久不 | 精品久久久久久久人人人人传媒 | 91黄色免费版| 久久久精品黄色| 亚洲福中文字幕伊人影院| 国产精品一级片在线观看| 色综合久久66| 国产喂奶挤奶一区二区三区| 亚洲一区二区五区| 岛国精品在线观看| 日韩精品一区二区三区三区免费 | 亚洲一区二区四区蜜桃| 国产精品小仙女| 欧美精品日韩一本| 1区2区3区国产精品| 免费人成精品欧美精品| 95精品视频在线| 精品国产91乱码一区二区三区 | 色诱亚洲精品久久久久久| 日韩免费视频一区二区| 亚洲综合在线观看视频| 高清日韩电视剧大全免费| 538prom精品视频线放| 亚洲精品大片www| 成人午夜激情片| 久久影院午夜论| 青青草精品视频| 在线观看成人免费视频| 亚洲欧洲av色图| 国产成人一区二区精品非洲| 日韩精品一区二区在线观看| 亚洲一区二区成人在线观看| 91猫先生在线| 亚洲欧美色综合| 成人高清av在线| 国产欧美精品一区二区色综合| 久久精品国产久精国产| 欧美一区二区三区爱爱| 亚洲成人综合视频| 欧美日韩在线直播| 亚洲国产一区视频| 欧美无砖专区一中文字| 亚洲综合色视频| 91官网在线免费观看| 亚洲美腿欧美偷拍| 色婷婷综合久久久久中文一区二区 | 亚洲色图一区二区| 92精品国产成人观看免费| 亚洲国产精品激情在线观看| 国产精品综合二区| 久久久www免费人成精品| 国产一区二区三区电影在线观看| 精品国产1区二区| 国产老肥熟一区二区三区| 久久精品夜色噜噜亚洲a∨| 韩国欧美一区二区| 国产喂奶挤奶一区二区三区| 国产成人免费在线视频| 国产精品女同一区二区三区| av亚洲精华国产精华| 亚洲欧美视频在线观看| 欧美专区日韩专区| 午夜av一区二区三区| 91精品在线观看入口| 久久av中文字幕片| 国产亚洲综合色| 色综合久久天天综合网| 夜夜嗨av一区二区三区中文字幕| 欧美三区在线观看| 日本美女一区二区三区| 久久女同精品一区二区| 99久久久久久99| 亚洲国产aⅴ成人精品无吗| 欧美电影免费观看完整版| 成人综合在线网站| 亚洲男人的天堂在线观看| 欧美日韩国产一区| 国精产品一区一区三区mba桃花| 国产精品乱码一区二区三区软件 | 91精品国产一区二区三区| 国产一区二区中文字幕| 中文字幕一区二区三中文字幕| 欧美三级一区二区|