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

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

?? postinputstream.java

?? struts spring ibatis
?? JAVA
字號:
/* ============================================================================                   The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of  source code must  retain the above copyright  notice,    this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice,    this list of conditions and the following disclaimer in the documentation    and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must    include  the following  acknowledgment:  "This product includes  software    developed  by the  Apache Software Foundation  (http://www.apache.org/)."    Alternately, this  acknowledgment may  appear in the software itself,  if    and wherever such third-party acknowledgments normally appear. 4. The names "Apache Cocoon" and  "Apache Software Foundation" must  not  be    used to  endorse or promote  products derived from  this software without    prior written permission. For written permission, please contact    apache@apache.org. 5. Products  derived from this software may not  be called "Apache", nor may    "Apache" appear  in their name,  without prior written permission  of the    Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software  consists of voluntary contributions made  by many individuals on  behalf of the Apache Software  Foundation and was  originally created by Stefano Mazzocchi  <stefano@apache.org>. For more  information on the Apache Software Foundation, please see <http://www.apache.org/>.*/package com.struts2.framework.util;import java.io.IOException;import java.io.InputStream;/** * The class PostInputStream is a wrapper for InputStream associated with POST message. * It allows to control read operation, restricting the number of bytes read to the value returned by getContentLen() method. * * @author <a href="mailto:Kinga_Dziembowski@hp.com">Kinga Dziembowski</a> * @version CVS $Id: PostInputStream.java,v 1.5 2002/02/22 07:03:57 cziegeler Exp $ */public class PostInputStream extends InputStream {    /**    * Class name    */    public static final String CLASS = PostInputStream.class.getName();    /** The real InputStream object */    private InputStream m_inputStream = null;    /** The length of InputStream */    private int m_contentLen = 0;    /** The number of bytes read */    protected int m_bytesRead = 0;    /**    * Creates a PostInputStream    */    public PostInputStream() {        super();    }    /**    * Creates a <code>PostInputStream</code> based on a real InputStream object with the specified    * post message body length. Saves its  argument, the input stream    * <code>m_inputStream</code>, for later use.    *    * @param   input     the underlying input stream.    * @param   len   the post message body length.    * @exception IllegalArgumentException  len <= 0.    */    public PostInputStream(final InputStream input, final int len) throws IllegalArgumentException {        super();        init(input, len );    }    /**    * Sets the underlying input stream and contentLen value .    *    * @param inputStream the input stream; can not be null.    * @param len the post message body length.    *    * @throws IllegalArgumentException    */    protected void init(final InputStream input, final int len) throws IllegalArgumentException {        if (len <= 0) {            throw new IllegalArgumentException("contentLen <= 0 ");        }        this.m_inputStream = input;        this.m_contentLen = len;    }    /**    * Sets the underlying input stream and contentLen value .    *    * @param inputStream the input stream; can not be null.    * @param len the post message body length.    *    * @throws IOException    */    public synchronized void setInputStream(final InputStream input, final int len) throws IOException {        if (m_inputStream != null) {            close();        }        init(input, len);    }    /**    * Returns the underlying input stream.    *    * @return inputStream the underlying InputStream.    */    public InputStream getInputStream() {        return( m_inputStream );    }    /**    * Returns the post message body length.    *    * @return m_contentLen;    */    public int getContentLen() {        return( m_contentLen );    }    /**    * Reads the next byte from the input stream.  If the end of the stream has been reached, this method returns -1.    *    * @return the next byte or -1 if at the end of the stream.    *    * @throws IOException    */    public synchronized int read() throws IOException {        checkOpen();        if (m_bytesRead == m_contentLen) {            return -1;        }        int byt =  m_inputStream.read();        if (byt != -1) {           m_bytesRead++;        }        return byt;    }    /**    * Reads bytes from this byte-input stream into the specified byte array,    * starting at the given offset.    *    * <p> This method implements the general contract of the corresponding    * <code>{@link InputStream#read(byte[], int, int) read}</code> method of    * the <code>{@link InputStream}</code> class.    * This method delegetes the read operation to the underlying InputStream implementation class but it    * controlls the number of bytes read from the stream. In the remote situation the underlying InputStream has no knowledge of    * the length of the stream and the notion of the "end" is undefined. This wrapper class has a knowledge of the    * length of data send by the requestor by the means of contentLength. This method returns the number of bytes read and    * accumulates the total number of bytes read in m_bytesRead. When the m_bytesRead is equal to the specified contentLength    * value the method returns returns -1 to signal the end of data.    *    * @param buffer the byte array to read into; can not be null.    * @param offset the starting offset in the byte array.    * @param len the maximum number of bytes to read.    *    * @return     the number of bytes read, or <code>-1</code> if the end of    *             the stream has been reached.    * @exception  IOException  if an I/O error occurs.    */    public synchronized int read(byte[] buffer, int offset, int len) throws IOException {        checkOpen();        if (m_bytesRead == m_contentLen) {            return -1;        }        int available = Math.min( available(), len );        int num = m_inputStream.read( buffer, offset, available );        if (num > 0) {            m_bytesRead += num;        }        return num;    }    public synchronized int read(byte[] buffer) throws IOException {        return read( buffer, 0, buffer.length);    }    /**    * Checks to see if this stream is closed; if it is, an IOException is thrown.    *    * @throws IOException    */    protected void checkOpen() throws IOException {        if (m_inputStream == null) {            throw new IOException("InputStream closed");        }    }    /**         * See the general contract of the <code>skip</code>     * method of <code>InputStream</code>.     * Delegates execution to the underlying InputStream implementation class.     * Checks to see if this stream is closed; if it is, an IOException is thrown.     * @param      n   the number of bytes to be skipped.     * @return     the actual number of bytes skipped.     * @exception  IOException  if an I/O error occurs.     */    public synchronized long skip(long n) throws IOException {        checkOpen();        if ( m_bytesRead == m_contentLen )        {            return ( 0 );        }        else        {            return ( m_inputStream.skip( n ) );        }    }    /**    * Returns the number of bytes available from this input stream that can be read without the stream blocking.    * Delegates execution to the underlying InputStream implementation class.    * @return available the number of available bytes.    *    * @throws IOException    */    public synchronized int available() throws IOException {        checkOpen();        int avail = m_inputStream.available();        return (avail == 0 ? (m_contentLen - m_bytesRead) : avail);    }    /**    * Tests if this input stream supports the <code>mark</code>    * and <code>reset</code> methods. The <code>markSupported</code>    * method of <code>BufferedInputStream</code> returns    * <code>false</code>.    *    * @return  a <code>boolean</code> indicating if this stream type supports    *          the <code>mark</code> and <code>reset</code> methods.    * @see     java.io.InputStream#mark(int)    * @see     java.io.InputStream#reset()    */    public boolean markSupported() {        return false;    }    /**    * Closes this input stream by closing the underlying stream and marking this one as closed.    *    * @throws IOException    */    public synchronized void close() throws IOException {        if (m_inputStream == null) {            return;        }        m_inputStream.close();        m_inputStream = null;        m_contentLen = 0;        m_bytesRead = 0;    }    /**    * Returns a String representation of this.    *    * @return string the String representation of this.    */    public String toString() {        return new StringBuffer(getClass().getName())                .append("[inputStream=").append(m_inputStream)                .append(",  contentLen=").append(m_contentLen)                .append("bytesRead=").append(m_bytesRead)                .append("]").toString();    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品亚洲一区二区三区在线 | 亚洲一区二区三区三| 国产亚洲精品久| 久久免费视频一区| 欧美精品一区二| 国产调教视频一区| 国产欧美日本一区二区三区| 亚洲日本在线天堂| 18欧美亚洲精品| 亚洲男人的天堂一区二区| 国产精品成人免费精品自在线观看| 国产女人水真多18毛片18精品视频 | 亚洲在线视频一区| 亚洲电影第三页| 开心九九激情九九欧美日韩精美视频电影 | av影院午夜一区| 91视频免费观看| 欧美色区777第一页| 88在线观看91蜜桃国自产| 91麻豆精品国产91久久久使用方法 | 欧美日韩国产另类不卡| 欧美丰满嫩嫩电影| 久久久久一区二区三区四区| 国产精品色眯眯| 亚洲一区二区在线观看视频| 日韩福利视频导航| 国产黄色精品网站| 色狠狠桃花综合| 日韩精品一区二区三区老鸭窝| 久久精品亚洲精品国产欧美kt∨| 自拍偷在线精品自拍偷无码专区| 亚洲国产精品久久久久秋霞影院 | 久久精品综合网| 一区二区三区在线视频观看58| 日本不卡不码高清免费观看| 高清不卡一区二区| 在线播放日韩导航| ●精品国产综合乱码久久久久| 日韩高清电影一区| 99久久精品国产观看| 日韩欧美综合在线| 有坂深雪av一区二区精品| 蜜臀av在线播放一区二区三区| 成人高清免费在线播放| 日韩欧美久久一区| 一区二区三区四区不卡视频| 精品夜夜嗨av一区二区三区| 日本道色综合久久| 国产情人综合久久777777| 亚洲一区二区四区蜜桃| 国产精品一区三区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 免费人成精品欧美精品| eeuss国产一区二区三区| 日韩欧美成人激情| 一区二区三区四区高清精品免费观看| 久久99精品国产麻豆不卡| 91国在线观看| 亚洲欧美日韩综合aⅴ视频| 国产成人av一区二区三区在线观看| 欧美日韩一区小说| 午夜日韩在线电影| 91福利资源站| 一区二区三区高清不卡| 99热精品一区二区| 国产精品久久久久9999吃药| 国产精品一区二区男女羞羞无遮挡 | 国产日韩欧美制服另类| 麻豆久久久久久久| 日韩美女天天操| 另类综合日韩欧美亚洲| 欧美一区二区三区男人的天堂 | 日韩一级二级三级精品视频| 亚洲一区二区四区蜜桃| 欧美色成人综合| 亚洲国产精品一区二区www| 欧美日韩一卡二卡三卡 | 欧美一区二区三区视频免费 | 亚洲国产综合在线| 国产偷v国产偷v亚洲高清| 国产精品亚洲一区二区三区在线| 久久午夜电影网| 国产成人三级在线观看| 国产精品无码永久免费888| 北岛玲一区二区三区四区| 综合精品久久久| 欧美日韩一本到| 奇米四色…亚洲| 精品国产麻豆免费人成网站| 国产激情精品久久久第一区二区| 亚洲国产精品传媒在线观看| 97久久超碰精品国产| 亚洲一二三四在线| 日韩精品专区在线影院重磅| 日本大胆欧美人术艺术动态| 亚洲精品在线三区| 99麻豆久久久国产精品免费优播| 久久成人av少妇免费| 精品卡一卡二卡三卡四在线| 国产a精品视频| 亚洲一区二区三区三| 日韩欧美一级二级| 菠萝蜜视频在线观看一区| 一区二区欧美国产| 26uuu另类欧美亚洲曰本| 99精品欧美一区二区蜜桃免费 | 欧美电影影音先锋| 国产综合久久久久久鬼色| 中文字幕在线观看不卡| 欧美日韩在线综合| 国产精品一区二区91| 亚洲专区一二三| 日本一区二区三区在线不卡| 欧美中文字幕不卡| 国产盗摄一区二区| 三级欧美在线一区| 亚洲欧洲99久久| 日韩欧美在线网站| 色屁屁一区二区| 国产一区二区三区日韩 | 日韩免费电影一区| 91欧美激情一区二区三区成人| 性做久久久久久免费观看欧美| 欧美精品一区二区三区很污很色的| 99久久亚洲一区二区三区青草| 欧美96一区二区免费视频| 亚洲欧美综合另类在线卡通| 日韩精品一区二区三区视频 | 国产激情91久久精品导航 | 亚洲精品中文在线| 2023国产一二三区日本精品2022| 91国产成人在线| a美女胸又www黄视频久久| 九九精品视频在线看| 天堂在线一区二区| 一卡二卡欧美日韩| 国产精品久99| 久久久久久综合| 精品对白一区国产伦| 欧美电影一区二区| 欧美视频在线一区| 色8久久人人97超碰香蕉987| 国产精品99久久不卡二区| 日韩精品乱码免费| 天堂蜜桃91精品| 午夜视频在线观看一区二区三区| 亚洲天堂免费在线观看视频| 欧美国产视频在线| 中文字幕欧美三区| 久久久久久久精| 国产日韩在线不卡| 国产精品卡一卡二| 国产精品久久久久久亚洲伦| 国产欧美精品一区aⅴ影院| 亚洲精品一区二区三区蜜桃下载 | 日本免费新一区视频| 午夜精品久久久久久久99樱桃| 亚洲成人免费在线| 午夜精品在线视频一区| 免费观看成人鲁鲁鲁鲁鲁视频| 日本最新不卡在线| 国产在线播精品第三| 国产乱理伦片在线观看夜一区| 国产综合色视频| 国产**成人网毛片九色 | 亚洲一区二区视频| 午夜精品aaa| 黄色小说综合网站| 成人av综合在线| 色婷婷精品大在线视频| 欧美日本国产视频| 精品国产人成亚洲区| 欧美国产激情一区二区三区蜜月| 亚洲欧洲精品成人久久奇米网| 一区二区高清免费观看影视大全| 一区二区三区自拍| 另类调教123区| 波多野结衣精品在线| 欧美性xxxxxxxx| 精品欧美乱码久久久久久| 欧美韩国日本不卡| 亚洲国产另类av| 国产一区二区剧情av在线| av不卡在线播放| 91精品免费在线观看| 久久久九九九九| 亚洲午夜免费福利视频| 国产乱淫av一区二区三区 | 成人高清在线视频| 欧美日韩一卡二卡| 欧美高清在线一区二区| 亚洲一区二区欧美日韩 | 日韩精品午夜视频| 成人黄色av电影| 日韩一区二区免费电影| 亚洲欧洲精品一区二区精品久久久 | 亚洲美女免费视频| 国内精品久久久久影院一蜜桃| 色呦呦一区二区三区| 欧美精品一区二区久久婷婷|