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

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

?? wrapfilter.java

?? java設計模式源碼
?? JAVA
字號:
package com.oozinoz.filter;

/*
 * Copyright (c) 2001, 2005. Steven J. Metsker.
 * 
 * Steve Metsker makes no representations or warranties about
 * the fitness of this software for any particular purpose, 
 * including the implied warranty of merchantability.
 *
 * Please use this software as you wish with the sole
 * restriction that you may not claim that you wrote it.
 */

import java.io.*;
import java.util.*;

/**
 * A WrapFilter object compresses whitespace and wraps text at a specified
 * width, optionally centering it. The class constructor requires a
 * BufferedWriter object and the line width. A typical filter class will accept
 * any Writer object in its constructor. The WrapFilter class requires a
 * BufferedWriter object because it requires the ability to write newlines in a
 * platform- independent way, and BufferedWriter supplies this ability.
 * <p>
 * The WrapFilter class expects line break indicators to appear as newline
 * characters. One way to arrange for this is to read input with a
 * BufferedReader object that handles platform differences in how line breaks
 * are indicated.
 * @author Steven J. Metsker
 */
public class WrapFilter extends OozinozFilter {
    protected int lineLength;
    protected StringBuffer lineBuf = new StringBuffer();
    protected StringBuffer wordBuf = new StringBuffer();
    protected boolean center = false;
    protected boolean inWhite = false;
    protected boolean needBlank = false;

    /**
     * Construct a filter that will wrap its writes at the specified length.
     * @param out a writer to which to pass down writes
     * @param lineLength the length at which to wrap text
     */
    public WrapFilter(BufferedWriter out, int lineLength) {
        super(out);
        this.lineLength = lineLength;
    }

    /**
     * Flush and close the stream.
     * @throws IOException if an I/O error occurs
     */
    public void close() throws IOException {
        flush();
        out.close();
    }

    /**
     * Write out any characters that were being held, awaiting a full line.
     * @throws IOException if an I/O error occurs
     */
    public void flush() throws IOException {
        if (wordBuf.length() > 0) postWord();

        if (lineBuf.length() > 0) postLine();

        out.flush();
    }

    /**
     * Write out the characters in the line buffer, optionally centering this
     * output.
     */
    protected void postLine() throws IOException {
        if (center) {
            int adjustment = Math.max(0, (lineLength - lineBuf.length()) / 2);
            char[] skootch = new char[adjustment];
            Arrays.fill(skootch, ' ');
            out.write(skootch);
        }
        out.write(lineBuf.toString());
    }

    /**
     * Add the word buffer to the line buffer, unless this would make the line
     * buffer too long. In that case, post the line buffer and then reset the
     * line buffer to the word buffer.
     */
    protected void postWord() throws IOException {
        if (lineBuf.length() + 1 + wordBuf.length() > lineLength) {
            postLine();
            ((BufferedWriter) out).newLine();
            lineBuf = wordBuf;
            wordBuf = new StringBuffer();
        } else {
            if (needBlank) 
                lineBuf.append(" ");

            lineBuf.append(wordBuf);
            needBlank = true;
            wordBuf = new StringBuffer();
        }
    }

    /**
     * @param center If true, output text will be centered.
     */
    public void setCenter(boolean center) {
        this.center = center;
    }

    /**
     * Add the given character to the current word buffer, unless the character
     * is whitespace. Whitespace marks the end of words. On seeing end of a
     * word, "post" it.
     * @param c the character to write
     * @throws IOException if an I/O error occurs
     */
    public void write(int c) throws IOException {
        if (Character.isWhitespace((char) c)) {
            if (!inWhite) 
                postWord();
            inWhite = true;
        } else {
            wordBuf.append((char) c);
            inWhite = false;
        }
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品白丝av| 91极品美女在线| 色94色欧美sute亚洲线路二| 91精品国产综合久久久蜜臀图片| 国产精品天天看| 久久国产精品露脸对白| 色菇凉天天综合网| 欧美激情一区在线观看| 久久国产乱子精品免费女| 欧美调教femdomvk| 亚洲日本va午夜在线电影| 国内不卡的二区三区中文字幕| 色哦色哦哦色天天综合| 国产亚洲自拍一区| 亚洲精品视频在线| 另类的小说在线视频另类成人小视频在线 | 中文字幕不卡一区| 五月激情综合婷婷| 91蜜桃在线观看| 国产婷婷色一区二区三区在线| 亚洲黄网站在线观看| 粉嫩在线一区二区三区视频| 91精品国产一区二区| 亚洲最新视频在线播放| 国产成人综合网| 91精品国产丝袜白色高跟鞋| 亚洲欧美激情视频在线观看一区二区三区 | 中文字幕一区二区日韩精品绯色| 婷婷综合五月天| 色噜噜狠狠一区二区三区果冻| 国产亚洲一区二区在线观看| 国产成人免费av在线| 在线成人小视频| 亚洲永久免费视频| 99久久免费国产| 中文字幕精品综合| 激情综合网激情| 日韩精品中午字幕| 亚洲人一二三区| 日本不卡一区二区三区| 欧美日韩国产精品自在自线| 国产亚洲1区2区3区| 国产一区二区三区| 久久久久久一二三区| 精品午夜久久福利影院| 欧美一区二区三级| 天天射综合影视| 在线播放/欧美激情| 天天综合网 天天综合色| 欧美日韩国产中文| 亚洲成人动漫在线免费观看| 欧美日韩在线综合| 婷婷中文字幕一区三区| 欧美精品v国产精品v日韩精品| 亚洲日本va午夜在线电影| 91精品1区2区| 亚洲va天堂va国产va久| 欧美精三区欧美精三区| 久久精品久久99精品久久| 精品999久久久| 成人精品国产免费网站| 亚洲日本免费电影| 7777精品伊人久久久大香线蕉最新版| 日韩电影在线观看网站| 欧美精品一区二区三区四区| 国产精品白丝jk黑袜喷水| 精品国产一二三| 国产一区二区在线免费观看| 久久久久久9999| 91麻豆精品秘密| 午夜成人免费电影| 精品99一区二区| 91在线观看污| 男女男精品视频网| 中文字幕欧美激情| 欧美在线观看一二区| 免费成人美女在线观看.| 精品欧美一区二区久久| 91在线无精精品入口| 日本sm残虐另类| 国产日韩成人精品| 欧洲激情一区二区| 国内精品在线播放| 一区二区三区日韩在线观看| 欧美一级欧美三级| 国产在线播放一区| 亚洲狠狠丁香婷婷综合久久久| 91精品国产日韩91久久久久久| 国产剧情一区二区| 亚洲国产精品久久久久婷婷884| 欧美电影免费观看高清完整版在线观看 | 亚洲乱码中文字幕| 69堂国产成人免费视频| 精品一区二区三区香蕉蜜桃| 国产三级三级三级精品8ⅰ区| 在线观看av一区| 国产精品18久久久久久久网站| 亚洲国产cao| 国产精品色哟哟| 日韩免费观看高清完整版 | 国产综合久久久久影院| 亚洲美腿欧美偷拍| 国产色综合久久| 欧美一二三在线| 在线精品视频一区二区| 成人一区在线观看| 久久se精品一区二区| 亚洲午夜精品久久久久久久久| 久久一日本道色综合| 欧美精品第一页| 欧美在线观看18| 91在线精品一区二区三区| 国产成人欧美日韩在线电影| 日本伊人色综合网| 午夜精品在线看| 亚洲制服欧美中文字幕中文字幕| 国产拍欧美日韩视频二区| 精品国产91洋老外米糕| 欧美一级一级性生活免费录像| 欧洲精品一区二区| 在线观看一区二区精品视频| 爽好多水快深点欧美视频| 午夜电影久久久| 日韩av一区二区三区四区| 亚洲一区在线观看视频| 亚洲精品国产高清久久伦理二区| 久久久久久影视| 国产亚洲一区二区在线观看| 久久综合九色综合欧美就去吻| 日韩免费视频一区二区| 日韩一区二区不卡| 日韩午夜在线观看| 日韩免费高清视频| 2023国产一二三区日本精品2022| 欧美精品日韩精品| 91久久精品一区二区| 色女孩综合影院| 欧美色图12p| 欧美久久免费观看| 91精品久久久久久久91蜜桃| 日韩一级高清毛片| 精品黑人一区二区三区久久| 久久网这里都是精品| 欧美激情一区在线观看| 国产精品久久久久久久久晋中| 亚洲免费高清视频在线| 亚洲成人精品在线观看| 日本成人在线视频网站| 国产在线视视频有精品| 丰满放荡岳乱妇91ww| 91色乱码一区二区三区| 欧美日韩国产高清一区二区三区| 91麻豆精品国产91久久久久| 欧美精品丝袜中出| 久久综合色综合88| 国产精品剧情在线亚洲| 亚洲国产日韩a在线播放性色| 亚洲风情在线资源站| 亚洲午夜久久久久久久久电影院 | 色综合久久久久综合| 欧美午夜精品一区二区三区 | 国产福利电影一区二区三区| 99久久久无码国产精品| 欧美区视频在线观看| 日韩欧美aaaaaa| 中文字幕中文字幕一区二区| 亚洲大片免费看| 国产一区二区三区四区五区美女 | 欧美日韩高清影院| 国产日韩精品一区二区三区| 亚洲激情第一区| 国内精品久久久久影院薰衣草 | 亚洲欧美电影一区二区| 秋霞午夜鲁丝一区二区老狼| 国产一区二区91| 91婷婷韩国欧美一区二区| 26uuu精品一区二区| 亚洲欧洲日韩在线| 久久成人免费日本黄色| 91福利国产成人精品照片| 精品国产123| 亚洲韩国一区二区三区| 国产精品一二三四区| 欧美亚洲图片小说| 国产女同性恋一区二区| 男人的天堂久久精品| 在线观看三级视频欧美| 国产欧美日韩中文久久| 日韩国产欧美一区二区三区| 国产一区在线看| 色综合中文综合网| 夜夜精品浪潮av一区二区三区| 国产自产高清不卡| 91久久线看在观草草青青| 久久综合色婷婷| 捆绑调教美女网站视频一区| 欧美怡红院视频| 中文字幕在线一区免费| 加勒比av一区二区| 7777精品伊人久久久大香线蕉超级流畅|