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

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

?? filepart.java

?? Light in the box 抓取程序。 使用HttpClient
?? JAVA
字號(hào):
/* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/methods/multipart/FilePart.java,v 1.19 2004/04/18 23:51:37 jsdever Exp $ * $Revision: 480424 $ * $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $ * * ==================================================================== * *  Licensed to the Apache Software Foundation (ASF) under one or more *  contributor license agreements.  See the NOTICE file distributed with *  this work for additional information regarding copyright ownership. *  The ASF licenses this file to You 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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation.  For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */package org.apache.commons.httpclient.methods.multipart;import java.io.File;import java.io.FileNotFoundException;import java.io.IOException;import java.io.InputStream;import java.io.OutputStream;import org.apache.commons.httpclient.util.EncodingUtil;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;/** * This class implements a part of a Multipart post object that * consists of a file.   * * @author <a href="mailto:mattalbright@yahoo.com">Matthew Albright</a> * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a> * @author <a href="mailto:adrian@ephox.com">Adrian Sutton</a> * @author <a href="mailto:becke@u.washington.edu">Michael Becke</a> * @author <a href="mailto:mdiggory@latte.harvard.edu">Mark Diggory</a> * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a> *    * @since 2.0  * */public class FilePart extends PartBase {    /** Default content encoding of file attachments. */    public static final String DEFAULT_CONTENT_TYPE = "application/octet-stream";    /** Default charset of file attachments. */    public static final String DEFAULT_CHARSET = "ISO-8859-1";    /** Default transfer encoding of file attachments. */    public static final String DEFAULT_TRANSFER_ENCODING = "binary";    /** Log object for this class. */    private static final Log LOG = LogFactory.getLog(FilePart.class);    /** Attachment's file name */    protected static final String FILE_NAME = "; filename=";    /** Attachment's file name as a byte array */    private static final byte[] FILE_NAME_BYTES =         EncodingUtil.getAsciiBytes(FILE_NAME);    /** Source of the file part. */    private PartSource source;    /**     * FilePart Constructor.     *     * @param name the name for this part     * @param partSource the source for this part     * @param contentType the content type for this part, if <code>null</code> the      * {@link #DEFAULT_CONTENT_TYPE default} is used     * @param charset the charset encoding for this part, if <code>null</code> the      * {@link #DEFAULT_CHARSET default} is used     */    public FilePart(String name, PartSource partSource, String contentType, String charset) {                super(            name,             contentType == null ? DEFAULT_CONTENT_TYPE : contentType,             charset == null ? "ISO-8859-1" : charset,             DEFAULT_TRANSFER_ENCODING        );        if (partSource == null) {            throw new IllegalArgumentException("Source may not be null");        }        this.source = partSource;    }            /**     * FilePart Constructor.     *     * @param name the name for this part     * @param partSource the source for this part     */    public FilePart(String name, PartSource partSource) {        this(name, partSource, null, null);    }    /**     * FilePart Constructor.     *     * @param name the name of the file part     * @param file the file to post     *     * @throws FileNotFoundException if the <i>file</i> is not a normal     * file or if it is not readable.     */    public FilePart(String name, File file)     throws FileNotFoundException {        this(name, new FilePartSource(file), null, null);    }    /**     * FilePart Constructor.     *     * @param name the name of the file part     * @param file the file to post     * @param contentType the content type for this part, if <code>null</code> the      * {@link #DEFAULT_CONTENT_TYPE default} is used     * @param charset the charset encoding for this part, if <code>null</code> the      * {@link #DEFAULT_CHARSET default} is used     *     * @throws FileNotFoundException if the <i>file</i> is not a normal     * file or if it is not readable.     */    public FilePart(String name, File file, String contentType, String charset)     throws FileNotFoundException {        this(name, new FilePartSource(file), contentType, charset);    }     /**     * FilePart Constructor.     *     * @param name the name of the file part     * @param fileName the file name      * @param file the file to post     *     * @throws FileNotFoundException if the <i>file</i> is not a normal     * file or if it is not readable.     */    public FilePart(String name, String fileName, File file)     throws FileNotFoundException {        this(name, new FilePartSource(fileName, file), null, null);    }         /**     * FilePart Constructor.     *     * @param name the name of the file part     * @param fileName the file name      * @param file the file to post     * @param contentType the content type for this part, if <code>null</code> the      * {@link #DEFAULT_CONTENT_TYPE default} is used     * @param charset the charset encoding for this part, if <code>null</code> the      * {@link #DEFAULT_CHARSET default} is used     *     * @throws FileNotFoundException if the <i>file</i> is not a normal     * file or if it is not readable.     */    public FilePart(String name, String fileName, File file, String contentType, String charset)     throws FileNotFoundException {        this(name, new FilePartSource(fileName, file), contentType, charset);    }        /**     * Write the disposition header to the output stream     * @param out The output stream     * @throws IOException If an IO problem occurs     * @see Part#sendDispositionHeader(OutputStream)     */    protected void sendDispositionHeader(OutputStream out)     throws IOException {        LOG.trace("enter sendDispositionHeader(OutputStream out)");        super.sendDispositionHeader(out);        String filename = this.source.getFileName();        if (filename != null) {            out.write(FILE_NAME_BYTES);            out.write(QUOTE_BYTES);            out.write(EncodingUtil.getAsciiBytes(filename));            out.write(QUOTE_BYTES);        }    }        /**     * Write the data in "source" to the specified stream.     * @param out The output stream.     * @throws IOException if an IO problem occurs.     * @see org.apache.commons.httpclient.methods.multipart.Part#sendData(OutputStream)     */    protected void sendData(OutputStream out) throws IOException {        LOG.trace("enter sendData(OutputStream out)");        if (lengthOfData() == 0) {                        // this file contains no data, so there is nothing to send.            // we don't want to create a zero length buffer as this will            // cause an infinite loop when reading.            LOG.debug("No data to send.");            return;        }                byte[] tmp = new byte[4096];        InputStream instream = source.createInputStream();        try {            int len;            while ((len = instream.read(tmp)) >= 0) {                out.write(tmp, 0, len);            }        } finally {            // we're done with the stream, close it            instream.close();        }    }    /**      * Returns the source of the file part.     *       * @return The source.     */    protected PartSource getSource() {        LOG.trace("enter getSource()");        return this.source;    }    /**     * Return the length of the data.     * @return The length.     * @throws IOException if an IO problem occurs     * @see org.apache.commons.httpclient.methods.multipart.Part#lengthOfData()     */        protected long lengthOfData() throws IOException {        LOG.trace("enter lengthOfData()");        return source.getLength();    }    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲乱码国产乱码精品精可以看| 国产乱子伦一区二区三区国色天香| 亚洲午夜久久久久久久久电影网 | 亚洲日本成人在线观看| 亚洲国产cao| 成人av在线播放网址| 欧美日韩另类一区| 中文字幕av一区二区三区| 日韩激情一区二区| 色噜噜狠狠成人中文综合| 久久综合久久综合亚洲| 亚洲第一狼人社区| 91麻豆高清视频| 国产欧美一区二区在线| 日本vs亚洲vs韩国一区三区| 一本大道av伊人久久综合| 久久久久久久久久久久久久久99 | 欧美放荡的少妇| 亚洲欧美在线另类| 国产高清视频一区| 欧美成人高清电影在线| 亚洲va欧美va国产va天堂影院| 成人污视频在线观看| 久久亚洲精精品中文字幕早川悠里| 五月婷婷欧美视频| 欧美日韩精品一区视频| 亚洲欧洲成人av每日更新| 国产传媒久久文化传媒| 欧美精品一区视频| 国产真实乱对白精彩久久| 精品国产91洋老外米糕| 免费成人美女在线观看.| 欧美一级生活片| 日韩av在线播放中文字幕| 欧美久久高跟鞋激| 亚洲va国产va欧美va观看| 欧美日韩国产bt| 天堂精品中文字幕在线| 欧美区一区二区三区| 天天av天天翘天天综合网| 欧美日韩激情一区| 性久久久久久久久| 日韩一区二区麻豆国产| 美脚の诱脚舐め脚责91| 欧美大肚乱孕交hd孕妇| 久久电影国产免费久久电影| 精品国产一区二区亚洲人成毛片| 国内成+人亚洲+欧美+综合在线| 日韩写真欧美这视频| 国产一区二区三区| 国产精品免费视频网站| 91在线码无精品| 亚州成人在线电影| 日韩免费看的电影| 丰满岳乱妇一区二区三区| 亚洲国产精品成人综合色在线婷婷| 99综合电影在线视频| 一区二区三区四区在线免费观看 | 日本欧美肥老太交大片| 91精品国产综合久久香蕉的特点 | 国产精品视频yy9299一区| 成人av网址在线观看| 一区二区三区精品在线观看| 欧美挠脚心视频网站| 国产精品一区二区久久不卡| **欧美大码日韩| 在线观看91av| 国产成人精品综合在线观看| 亚洲精品少妇30p| 日韩视频在线你懂得| 国产精品系列在线观看| 亚洲综合小说图片| 亚洲精品在线三区| 色婷婷综合久久久中文一区二区| 日韩电影在线观看网站| 久久综合一区二区| 欧美在线制服丝袜| 国模套图日韩精品一区二区| 一区二区三区四区av| 欧美成人a∨高清免费观看| 91视视频在线观看入口直接观看www | 九色porny丨国产精品| 成人免费一区二区三区视频 | 精品少妇一区二区三区免费观看 | 国产日韩欧美精品综合| 欧美亚洲一区二区在线观看| 国产一区二区精品久久91| 亚洲高清视频中文字幕| 国产精品三级电影| 欧美成人一区二区| 日本乱人伦aⅴ精品| 国产91精品一区二区麻豆网站| 亚洲成va人在线观看| 国产精品国产三级国产专播品爱网| 在线电影院国产精品| 色一情一伦一子一伦一区| 国产精品一卡二| 男男视频亚洲欧美| 亚洲午夜羞羞片| 亚洲欧美日韩国产综合| 国产无遮挡一区二区三区毛片日本| 911精品国产一区二区在线| 99久久久国产精品| 国产激情视频一区二区在线观看| 免费高清视频精品| 蜜臀av性久久久久蜜臀aⅴ| 亚洲综合免费观看高清完整版| 国产精品国产三级国产a| 国产免费成人在线视频| 久久女同性恋中文字幕| 亚洲精品在线一区二区| 欧美成人精品福利| 精品国产成人系列| 精品少妇一区二区三区日产乱码| 欧美一卡2卡3卡4卡| 制服.丝袜.亚洲.中文.综合| 欧美日韩日日骚| 在线观看日韩国产| 欧美色综合影院| 欧美日韩视频专区在线播放| 欧美日韩中文另类| 欧美精品tushy高清| 欧美日本一区二区三区四区| 欧美日韩在线播放三区四区| 欧美日韩1区2区| 91精品免费观看| 日韩欧美中文字幕精品| 欧美草草影院在线视频| 精品对白一区国产伦| 久久久九九九九| 国产精品人人做人人爽人人添| 国产精品久久久久9999吃药| 亚洲特黄一级片| 亚洲超丰满肉感bbw| 欧美aaaaaa午夜精品| 国产在线播放一区三区四| 国产大片一区二区| 色诱亚洲精品久久久久久| 欧美特级限制片免费在线观看| 欧美日韩夫妻久久| 久久亚洲精品小早川怜子| 亚洲欧美综合另类在线卡通| 一区二区三国产精华液| 青青草国产精品97视觉盛宴| 黄色精品一二区| 91啪亚洲精品| 欧美欧美欧美欧美| 欧美精品一区二区三区很污很色的| 日本一区二区综合亚洲| 玉米视频成人免费看| 麻豆国产欧美日韩综合精品二区 | 成人一级片在线观看| 欧美日韩亚洲另类| 久久精子c满五个校花| 亚洲一区二区欧美激情| 国产美女精品在线| 在线这里只有精品| 久久久美女艺术照精彩视频福利播放| 国产精品久久久久aaaa樱花| 婷婷综合在线观看| 99久久伊人精品| 7777精品伊人久久久大香线蕉最新版| 日韩欧美国产精品| 亚洲免费在线观看| 国内精品国产三级国产a久久| 91久久精品午夜一区二区| 久久综合九色综合欧美就去吻| 亚洲啪啪综合av一区二区三区| 另类人妖一区二区av| 色综合天天狠狠| 久久嫩草精品久久久精品一| 亚洲国产sm捆绑调教视频| 成人黄色片在线观看| 日韩精品在线看片z| 亚洲尤物在线视频观看| 丁香六月久久综合狠狠色| 欧美一级夜夜爽| 亚洲一区二区三区不卡国产欧美| 国产精品一区二区三区四区| 欧美另类高清zo欧美| 综合欧美一区二区三区| 国产精品一级片| 日韩欧美国产麻豆| 青青草精品视频| 欧美日韩高清在线| 一区二区成人在线观看| 91在线播放网址| 国产精品日韩成人| 大桥未久av一区二区三区中文| 日韩美女主播在线视频一区二区三区| 亚洲综合一区二区三区| 91网上在线视频| 专区另类欧美日韩| av欧美精品.com| 欧美激情一区二区三区蜜桃视频| 狠狠色丁香久久婷婷综| 日韩欧美精品在线视频| 久久激情综合网| 精品国产一区二区三区av性色| 日本成人在线不卡视频|