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

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

?? messageelement.java

?? jxta平臺的開發包
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * * $Id: MessageElement.java,v 1.25 2005/08/08 19:59:05 bondolo Exp $ * * Copyright (c) 2001 Sun Microsystems, Inc.  All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, 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 *       Sun Microsystems, Inc. for Project JXTA." *    Alternately, this acknowledgment may appear in the software itself, *    if and wherever such third-party acknowledgments normally appear. * * 4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" *    must not be used to endorse or promote products derived from this *    software without prior written permission. For written *    permission, please contact Project JXTA at http://www.jxta.org. * * 5. Products derived from this software may not be called "JXTA", *    nor may "JXTA" appear in their name, without prior written *    permission of Sun. * * 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 SUN MICROSYSTEMS OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 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 Project JXTA.  For more * information on Project JXTA, please see * <http://www.jxta.org/>. * * This license is based on the BSD license adopted by the Apache Foundation. */package net.jxta.endpoint;import java.io.DataInput;import java.io.DataInputStream;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;import java.io.OutputStream;import java.io.Reader;import java.lang.ref.SoftReference;import java.util.HashMap;import java.util.Map;import java.io.UnsupportedEncodingException;import org.apache.log4j.Level;import org.apache.log4j.Logger;import net.jxta.document.Document;import net.jxta.document.MimeMediaType;import net.jxta.util.CountingOutputStream;import net.jxta.util.DevNullOutputStream;// imported for implementation of {@link #getUniqueName()} and {@link #getSequentialName()}import net.jxta.impl.id.UUID.UUIDFactory;/** * JXTA Message Elements are used to add data to a Message. Message Elements are * immutable objects. A Message Element may be shared amongst as many messages * as is desired. A Message Element is composed of four components: * *  <ul> *  <li>An optional name. This may be any {@link java.lang.String}. Unnamed * elements are assumed to have the name "" (the empty string).</li> *  <li>An optional {@link net.jxta.document.MimeMediaType}. If not specified * the Mime Media Type is assumed to be "Application/Octet-Stream".</li> *  <li>Data. Sub-classes of MessageElement allow you to create elements based * on a variety of data formats.</li> *  <li>An optional signature. This is a Message Element that is associated to *  this element and may contain a cryptographic signature/hash of this message *  element. *  </li> * *  <p/>The data contained with in a MessageElement is accessible in four ways: * *  <ul> *  <li>As an {@link java.io.InputStream}</li> *  <li>Sending the data a {@link java.io.OutputStream}</li> *  <li>As a {@link java.lang.String}.</li> *  <li>As a byte array.</li> *  </ul> * * @see net.jxta.endpoint.Message */public abstract class MessageElement implements Document {        /**     *  Log4J logger     **/    private static transient final Logger LOG = Logger.getLogger( MessageElement.class.getName());        /**     *  The name of this element. May be the empty string ("") if the element is     *  unnamed.     **/    protected final String name;        /**     *  The type of this element.     **/    protected final MimeMediaType type;        /**     *  The optional element which digitially signs or digests this element.     *  If null then the element is has no signature element.     **/    protected final MessageElement sig;        /**     *  message properties hashmap     **/    protected Map properties = new HashMap();        /**     *  cached result of {@link #getByteLength()} operation.     **/    protected transient long cachedGetByteLength = -1;        /**     *  cached result of {@link #getBytes(boolean)} operation.     **/    protected transient SoftReference cachedGetBytes = null;        /**     *  cached result of {@link #toString()} operation.     **/    protected transient SoftReference cachedToString = null;        /**     * Returns a pseudo-random unique string which can be used as an element     * name.     *     * @return String containing a pseudo-random value     */    public static String getUniqueName() {        return UUIDFactory.newUUID().toString();    }        /**     * Returns a string containing a pseudo-random unique string. The result of     * <code>String.compare()</code> will be consistent with the order in which     * results were returned from this function.     *     * <p/>Security Consideration : Be aware that the pseudo random portion of     * the names generated by this string are shared amongst all peer groups     * running in the same classloader. You may be at a risk for loss of     * annonimity if you use the element names produced in more than one peer     * group.     *     * @return String containing a pseudo-random value. The result of     * <code>String.compare()</code> will be consistent with the order in     * which results were returned from this function.     *     */    public static String getSequentialName() {        return UUIDFactory.newSeqUUID().toString();    }        /**     *  Internal constructor for initializaing everything but the data.     *     *   @param name Name of the Element. May be the empty string ("") if     *    the Element is not named.     *   @param type Type of the Element. null is equivalent to specifying     *    the type "Application/Octet-stream"     *   @param sig optional message digest/digital signature elemnent. If     *    no signature is to be specified, pass null.     **/    protected MessageElement( String name, MimeMediaType type, MessageElement sig ) {        this.name = ( null != name ) ? name : "";                this.type = ( null != type ) ? type : MimeMediaType.AOS;                if( (null != sig) && (null != sig.sig) ) {            throw new IllegalArgumentException( "Invalid Signature Element. Signatures may not have signatures." );        }                this.sig = sig;    }        /**     *  {@inheritDoc}     *     *  @deprecated Since Message Elements are immutable this method does     *  nothing useful.     **/    public final Object clone( ) {        return this;    }        /**     *  {@inheritDoc}     *     *  <p/>Elements are considered equal if they have the same name, type and     *  signatures. Element data is not considered by this implementation as     *  it is mostly intended for subclass use.     *     **/    public boolean equals( Object target ) {        if( this == target ){            return true;  // same object        }                if( target instanceof MessageElement ) {            MessageElement likeMe = (MessageElement) target;                        // sig is nullable so test seperatly.            boolean sigequals = (null != sig) ? sig.equals( likeMe.sig ) : (null==likeMe.sig);                        return sigequals &&            name.equals( likeMe.name ) &&            type.equals( likeMe.type );        }                return false; // not a MessageElement    }        /**     *  {@inheritDoc}     **/    public int hashCode( ) {        int sigHash = ( (null != getSignature()) && (this != getSignature())) ?        getSignature().hashCode() : 1;                int result =  sigHash * 2467 + // a prime        getElementName().hashCode() * 3943 + // also a prime        getMimeType().hashCode();                return (0 != result) ? result : 1;    }        /**     *  {@inheritDoc}     *     *  <p/>Returns a String representation of the element data. The     *  <code>'charset'</code> parameter of the message element's mimetype, if     *  any, is used to determine encoding. If the charset specified is     *  unsupported then the default enconding will be used.     *     *  <p/>synchronized for caching purposes.     **/    public synchronized String toString( ) {        String result = null;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本久久a久久精品亚洲| 亚洲精品在线观| 久久伊99综合婷婷久久伊| 日韩一区在线播放| 国产毛片精品视频| 欧美老肥妇做.爰bbww| 中文字幕制服丝袜成人av| 久久精品国产99| 91传媒视频在线播放| 久久久久国产精品人| 另类的小说在线视频另类成人小视频在线| 一本色道综合亚洲| 亚洲欧洲精品成人久久奇米网| 久久国产精品露脸对白| 欧美在线观看一区| 亚洲色图欧洲色图| 风间由美一区二区三区在线观看 | 欧美激情一区二区三区蜜桃视频| 五月综合激情婷婷六月色窝| 91一区二区三区在线观看| 国产精品妹子av| 国产剧情av麻豆香蕉精品| 日韩一级黄色大片| 亚洲香肠在线观看| 在线观看av不卡| 一区二区三区日韩精品视频| 97精品超碰一区二区三区| 国产女主播一区| 成人免费观看视频| 久久久美女毛片| 国产成人高清在线| 国产精品欧美综合在线| 成人午夜私人影院| 亚洲欧美乱综合| 91电影在线观看| 亚洲成人动漫在线观看| 在线播放国产精品二区一二区四区 | 成人午夜视频在线| 国产精品色婷婷| 99热在这里有精品免费| 亚洲少妇最新在线视频| 色悠久久久久综合欧美99| 亚洲免费观看在线视频| 国产美女精品在线| 日韩一卡二卡三卡国产欧美| 日韩成人午夜精品| 日韩精品在线网站| 国产一区二区三区香蕉| 久久精品人人做人人爽人人| av电影在线观看一区| 亚洲一区二区三区影院| 欧美日本精品一区二区三区| 麻豆国产欧美日韩综合精品二区 | 亚洲丝袜制服诱惑| 欧美日韩国产影片| 国内精品视频666| 日韩毛片一二三区| 91麻豆精品国产91久久久久 | 久久99精品一区二区三区三区| 精品国产乱码久久久久久图片| 岛国精品一区二区| 亚洲国产裸拍裸体视频在线观看乱了 | 三级影片在线观看欧美日韩一区二区| 91精品午夜视频| 成人美女视频在线观看18| 亚洲亚洲人成综合网络| 久久色成人在线| 欧美偷拍一区二区| 国产福利一区二区三区视频在线| 亚洲精品午夜久久久| 精品国产一区二区三区四区四| www.欧美.com| 欧美aaa在线| 亚洲欧美日韩国产综合| 精品剧情v国产在线观看在线| 色综合中文综合网| 亚洲一区二区三区四区在线免费观看| 欧美大胆人体bbbb| 在线欧美一区二区| 高清国产一区二区| 免费观看久久久4p| 一卡二卡三卡日韩欧美| 久久久久久9999| 69p69国产精品| 94-欧美-setu| 国产宾馆实践打屁股91| 蜜桃av一区二区三区电影| 亚洲日本中文字幕区| 久久免费视频色| 91精品国产黑色紧身裤美女| 91麻豆免费视频| 成人国产亚洲欧美成人综合网| 秋霞午夜鲁丝一区二区老狼| 一区二区三区中文在线观看| 欧美国产综合色视频| 欧美va亚洲va香蕉在线| 91精品国产综合久久蜜臀| 欧美午夜片在线观看| 色综合久久中文综合久久97| 国产+成+人+亚洲欧洲自线| 黑人巨大精品欧美一区| 久久99这里只有精品| 五月天丁香久久| 亚洲国产精品视频| 亚洲免费观看高清完整版在线观看熊| 中文字幕欧美区| 国产亚洲欧美色| 久久天天做天天爱综合色| 精品日韩在线观看| 精品欧美一区二区三区精品久久 | 久久不见久久见中文字幕免费| 免费观看久久久4p| 久久精品理论片| 韩国三级在线一区| 高清不卡在线观看av| 成人黄色一级视频| 91在线视频官网| 色老头久久综合| 精品视频全国免费看| 欧美肥妇毛茸茸| 精品国产乱码久久久久久蜜臀| 精品电影一区二区| 国产精品色哟哟| 亚洲蜜臀av乱码久久精品蜜桃| 亚洲小说欧美激情另类| 日韩福利电影在线观看| 激情深爱一区二区| 国产精品91一区二区| 91欧美一区二区| 欧美日韩www| 欧美精品一区二区三区高清aⅴ| 久久久久国产精品麻豆ai换脸| 国产亚洲精品福利| 一区二区久久久| 免费在线观看精品| 成人免费毛片aaaaa**| 日本高清不卡aⅴ免费网站| 欧美日韩国产高清一区| 337p日本欧洲亚洲大胆精品| 国产欧美日韩视频在线观看| 中文字幕一区二区视频| 午夜精品福利一区二区三区蜜桃| 秋霞国产午夜精品免费视频| 粉嫩13p一区二区三区| 在线亚洲精品福利网址导航| 日韩一区二区电影| 亚洲人123区| 久久国产精品色婷婷| 91色视频在线| 精品成人一区二区| 一区二区三区中文在线| 国模套图日韩精品一区二区| 91官网在线观看| 久久综合狠狠综合| 亚洲国产美女搞黄色| 东方aⅴ免费观看久久av| 欧美日韩中文字幕一区| 久久免费视频色| 天天色 色综合| 9l国产精品久久久久麻豆| 日韩欧美国产不卡| 一区二区日韩av| 成人网在线免费视频| 日韩免费观看高清完整版在线观看| 国产精品久久久久影视| 蜜桃av噜噜一区| 精品婷婷伊人一区三区三| 中文字幕在线观看一区二区| 久久99精品久久久久久动态图 | 麻豆91免费看| 欧美三级中文字| 亚洲欧洲av色图| 国产精品1区2区| 日韩欧美一二三区| 丝袜诱惑制服诱惑色一区在线观看| 成人av资源在线观看| 亚洲精品一区二区三区在线观看 | 国产婷婷色一区二区三区| 青青草国产精品亚洲专区无| 色综合久久中文综合久久牛| 国产精品视频一二三区| 国产精品1区2区3区在线观看| 日韩视频免费直播| 日韩不卡一区二区| 欧美日韩中文字幕一区| 亚洲一区av在线| 在线观看日韩毛片| 一区二区高清视频在线观看| 一本久道久久综合中文字幕| **欧美大码日韩| 一本到一区二区三区| 亚洲男人天堂一区| 91麻豆免费观看| 亚洲精品国产视频| 色狠狠综合天天综合综合| 国产精品久久久久久久岛一牛影视| 国产成人啪免费观看软件| www国产成人| 丁香婷婷综合激情五月色| 国产亚洲欧美在线|