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

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

?? email.java

?? 基于UDP的可靠郵件系統(tǒng)
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
	 * 
	 * @return approximate size of full message including headers.
	 * 
	 * @throws MessagingException
	 *             if a problem occurs while computing the message size
	 */
	public long getMessageSize(){
        // If we have a byte[]Wrapper, then we can ask it for just the
        // message size and skip calculating it
//        if (message instanceof byte[]Wrapper) {
//            byte[]Wrapper wrapper = (byte[]Wrapper) message;
//            return wrapper.getMessageSize();
//        }
//        // SK: Should probably eventually store this as a locally
//        // maintained value (so we don't have to load and reparse
//        // messages each time).
//        long size = message.getSize();
//        Enumeration e = message.getAllHeaderLines();
//        while (e.hasMoreElements()) {
//            size += ((String) e.nextElement()).length();
//        }
        return message.length;
    }

	/**
	 * Set the error message associated with this Email.
	 * 
	 * @param msg
	 *            the new error message associated with this Email
	 */
	public void setErrorMessage(String msg) {
		this.errorMessage = msg;
	}

	/**
	 * Set the byte[] associated with this Email.
	 * 
	 * @param message
	 *            the new byte[] associated with this Email
	 */
	public void setMessage(byte[] message) {
		this.message = message;
	}

	/**
	 * Set the recipients for this Email.
	 * 
	 * @param recipients
	 *            the recipients for this Email
	 */
	public void setRecipients(Collection recipients) {
		this.recipients = recipients;
	}

	/**
	 * Set the sender of this Email.
	 * 
	 * @param sender
	 *            the sender of this Email
	 */
	public void setSender(MailAddress sender) {
		this.sender = sender;
	}

	/**
	 * Set the state of this Email.
	 * 
	 * @param state
	 *            the state of this Email
	 */
	public void setState(String state) {
		this.state = state;
	}

	/**
	 * Set the remote address associated with this Email.
	 * 
	 * @param remoteHost
	 *            the new remote host associated with this Email
	 */
	public void setRemoteHost(String remoteHost) {
		this.remoteHost = remoteHost;
	}

	/**
	 * Set the remote address associated with this Email.
	 * 
	 * @param remoteAddr
	 *            the new remote address associated with this Email
	 */
	public void setRemoteAddr(String remoteAddr) {
		this.remoteAddr = remoteAddr;
	}

	/**
	 * Set the date this mail was last updated.
	 * 
	 * @param lastUpdated
	 *            the date the mail was last updated
	 */
	public void setLastUpdated(Date lastUpdated) {
		// Make a defensive copy to ensure that the date
		// doesn't get changed external to the class
		if (lastUpdated != null) {
			lastUpdated = new Date(lastUpdated.getTime());
		}
		this.lastUpdated = lastUpdated;
	}

	/**
	 * Writes the message out to an OutputStream.
	 * 
	 * @param out
	 *            the OutputStream to which to write the content
	 * 
	 * @throws MessagingException
	 *             if the byte[] is not set for this Email
	 * @throws IOException
	 *             if an error occurs while reading or writing from the stream
	 */
	public void writeMessageTo(OutputStream out) throws IOException{
			 out.write(message);
//		if (message != null) {
//			message.writeTo(out);
//		} else {
//			throw new MessagingException("No message set for this Email.");
//		}
	}

//	/**
//	 * Generates a bounce mail that is a bounce of the original message.
//	 * 
//	 * @param bounceText
//	 *            the text to be prepended to the message to describe the bounce
//	 *            condition
//	 * 
//	 * @return the bounce mail
//	 * 
//	 * @throws MessagingException
//	 *             if the bounce mail could not be created
//	 */
//	public Mail bounce(String bounceText) throws MessagingException {
//		// This sends a message to the james component that is a bounce of the
//		// sent message
//		byte[] original = getMessage();
//		byte[] reply = (byte[]) original.reply(false);
//		reply.setSubject("Re: " + original.getSubject());
//		Collection recipients = new HashSet();
//		recipients.add(getSender());
//		InternetAddress addr[] = { new InternetAddress(getSender().toString()) };
//		reply.setRecipients(Message.RecipientType.TO, addr);
//		reply.setFrom(new InternetAddress(getRecipients().iterator().next()
//				.toString()));
//		reply.setText(bounceText);
//		reply.setHeader(RFC2822Headers.MESSAGE_ID, "replyTo-" + getName());
//		return new Email("replyTo-" + getName(), new MailAddress(
//				getRecipients().iterator().next().toString()), recipients,
//				reply);
//	}

	/**
	 * Writes the content of the message, up to a total number of lines, out to
	 * an OutputStream.
	 * 
	 * @param out
	 *            the OutputStream to which to write the content
	 * @param lines
	 *            the number of lines to write to the stream
	 * 
	 * @throws MessagingException
	 *             if the byte[] is not set for this Email
	 * @throws IOException
	 *             if an error occurs while reading or writing from the stream
	 */
//	public void writeContentTo(OutputStream out, int lines) throws IOException
//			 {
//		String line;
//		BufferedReader br;
//		if (message != null) {
//			br = new BufferedReader(new InputStreamReader(message
//					.getInputStream()));
//			while (lines-- > 0) {
//				if ((line = br.readLine()) == null) {
//					break;
//				}
//				line += "\r\n";
//				out.write(line.getBytes());
//			}
//		} else {
//			throw new MessagingException("No message set for this Email.");
//		}
//	}

	// Serializable Methods
	// TODO: These need some work. Currently very tightly coupled to
	// the internal representation.
	/**
	 * Read the Email from an <code>ObjectInputStream</code>.
	 * 
	 * @param in
	 *            the ObjectInputStream from which the object is read
	 * 
	 * @throws IOException
	 *             if an error occurs while reading from the stream
	 * @throws ClassNotFoundException ?
	 * @throws ClassCastException
	 *             if the serialized objects are not of the appropriate type
	 */

	private void readObject(java.io.ObjectInputStream in) throws IOException,
			ClassNotFoundException {
		try {
			Object obj = in.readObject();
			if (obj == null) {
				sender = null;
			} else if (obj instanceof String) {
				sender = new MailAddress((String) obj);
			} else if (obj instanceof MailAddress) {
				sender = (MailAddress) obj;
			}
		} catch (Exception e) {
			throw new IOException("Error parsing sender address: "
					+ e.getMessage());
		}
		recipients = (Collection) in.readObject();
		state = (String) in.readObject();
		errorMessage = (String) in.readObject();
		name = (String) in.readObject();
		remoteHost = (String) in.readObject();
		remoteAddr = (String) in.readObject();
		setLastUpdated((Date) in.readObject());
		
		// the following is under try/catch to be backwards compatible
		// with messages created with James version <= 2.2.0a8
		try {
			attributes = (HashMap) in.readObject();
			message =(byte[]) in.readObject();
		} catch (OptionalDataException ode) {
			if (ode.eof) {
				attributes = new HashMap();
			} else {
				throw ode;
			}
		}
	}

	/**
	 * Write the Email to an <code>ObjectOutputStream</code>.
	 * 
	 * @param in
	 *            the ObjectOutputStream to which the object is written
	 * 
	 * @throws IOException
	 *             if an error occurs while writing to the stream
	 */

	private void writeObject(java.io.ObjectOutputStream out) throws IOException {
		lastUpdated = new Date();
		out.writeObject(sender);
		out.writeObject(recipients);
		out.writeObject(state);
		out.writeObject(errorMessage);
		out.writeObject(name);
		out.writeObject(remoteHost);
		out.writeObject(remoteAddr);
		out.writeObject(lastUpdated);
		out.writeObject(attributes);
		out.writeObject(message);
	}

	// /**
	// * @see org.apache.avalon.framework.activity.Disposable#dispose()
	// */
	// public void dispose() {
	// try {
	// byte[] wrapper = getMessage();
	// if (wrapper instanceof Disposable) {
	// ((Disposable)wrapper).dispose();
	// }
	// } catch (MessagingException me) {
	// // Ignored
	// }
	// }

	/**
	 * This method is necessary, when Mail repositories needs to deal explicitly
	 * with storing Mail attributes as a Serializable Note: This method is not
	 * exposed in the Mail interface, it is for internal use by James only.
	 * 
	 * @return Serializable of the entire attributes collection
	 * @since 2.2.0
	 */
	public HashMap getAttributesRaw() {
		return attributes;
	}

	/**
	 * This method is necessary, when Mail repositories needs to deal explicitly
	 * with retriving Mail attributes as a Serializable Note: This method is not
	 * exposed in the Mail interface, it is for internal use by James only.
	 * 
	 * @return Serializable of the entire attributes collection
	 * @since 2.2.0
	 */
	public void setAttributesRaw(HashMap attr) {
		this.attributes = (attr == null) ? new HashMap() : attr;
	}

	/**
	 * @see org.apache.mailet.Mail#getAttribute(String)
	 * @since 2.2.0
	 */
	public Serializable getAttribute(String key) {
		return (Serializable) attributes.get(key);
	}

	/**
	 * @see org.apache.mailet.Mail#setAttribute(String,Serializable)
	 * @since 2.2.0
	 */
	public Serializable setAttribute(String key, Serializable object) {
		return (Serializable) attributes.put(key, object);
	}

	/**
	 * @see org.apache.mailet.Mail#removeAttribute(String)
	 * @since 2.2.0
	 */
	public Serializable removeAttribute(String key) {
		return (Serializable) attributes.remove(key);
	}

	/**
	 * @see org.apache.mailet.Mail#removeAllAttributes()
	 * @since 2.2.0
	 */
	public void removeAllAttributes() {
		attributes.clear();
	}

	/**
	 * @see org.apache.mailet.Mail#getAttributeNames()
	 * @since 2.2.0
	 */
	public Iterator getAttributeNames() {
		return attributes.keySet().iterator();
	}

	/**
	 * @see org.apache.mailet.Mail#hasAttributes()
	 * @since 2.2.0
	 */
	public boolean hasAttributes() {
		return !attributes.isEmpty();
	}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产一区二区三区青草影视| 亚洲精品视频免费观看| 亚洲欧洲成人精品av97| 蜜臀国产一区二区三区在线播放| 国产成人99久久亚洲综合精品| 欧美日韩国产不卡| 午夜欧美一区二区三区在线播放| 97久久超碰国产精品| 成人免费在线观看入口| 国产精品123区| 久久综合久久99| 一区二区三区中文字幕| 在线观看免费一区| 婷婷夜色潮精品综合在线| 欧美日韩激情在线| 午夜精品福利久久久| 欧美一区二区三区不卡| 韩国精品久久久| 国产日韩三级在线| 国产一区二区网址| 亚洲激情自拍偷拍| 日韩午夜中文字幕| 91色在线porny| 奇米影视在线99精品| 国产亚洲综合在线| 欧美在线观看一区二区| 日本vs亚洲vs韩国一区三区二区| 久久综合久久鬼色中文字| 91视频www| 国产一区二区三区精品欧美日韩一区二区三区 | 欧美国产在线观看| 97久久精品人人做人人爽50路| 亚洲一区二区三区三| 在线视频国内自拍亚洲视频| 日本亚洲天堂网| 成人爱爱电影网址| 欧美日韩在线播放三区四区| 亚洲精品在线免费观看视频| 蜜臀av性久久久久蜜臀aⅴ| 国产精品不卡一区| 日韩久久久久久| 精品视频资源站| 99久久精品免费| 国产精品888| 国产成人精品免费看| 水野朝阳av一区二区三区| 亚洲精选一二三| 久久精品欧美日韩| 欧美精品一区男女天堂| 91 com成人网| 欧美日韩久久久一区| av电影在线不卡| 岛国精品在线观看| 九九国产精品视频| 日韩精品亚洲专区| 婷婷综合五月天| 亚洲自拍偷拍av| 天堂va蜜桃一区二区三区| 亚洲va欧美va国产va天堂影院| 伊人色综合久久天天| 亚洲国产精品一区二区www在线| 亚洲日本va午夜在线影院| 亚洲美女电影在线| 亚洲18色成人| 韩国女主播成人在线| 国内欧美视频一区二区| www.日韩av| 欧美久久一区二区| 精品噜噜噜噜久久久久久久久试看| 日韩免费观看高清完整版| 久久精品亚洲精品国产欧美| 久久蜜桃av一区精品变态类天堂 | 亚洲观看高清完整版在线观看| 亚洲免费资源在线播放| 性久久久久久久| 经典三级视频一区| 国产精品午夜免费| 午夜精品在线视频一区| 婷婷丁香激情综合| 视频一区二区三区中文字幕| 亚洲大片在线观看| 久久99国产精品久久99果冻传媒| 久久99精品网久久| 一本久久综合亚洲鲁鲁五月天 | 欧美视频中文一区二区三区在线观看| 国产成人在线色| 色综合天天视频在线观看| 宅男噜噜噜66一区二区66| 中文字幕日韩一区| 国产精品一区二区男女羞羞无遮挡| 国产精品77777竹菊影视小说| 精品日本一线二线三线不卡| 国产丝袜欧美中文另类| 亚洲图片激情小说| 成人短视频下载| 久久精品视频一区二区| 国产一区高清在线| 久久久国产精华| 国产麻豆视频精品| 欧美精品 国产精品| 亚洲午夜久久久久久久久电影网 | 久久免费午夜影院| 国产成都精品91一区二区三| 国产亚洲视频系列| 一本久久a久久免费精品不卡| 中文字幕一区二区三区在线观看 | 8v天堂国产在线一区二区| 婷婷久久综合九色综合绿巨人| 欧美精品自拍偷拍| 激情欧美一区二区三区在线观看| 久久久一区二区三区捆绑**| 成人h版在线观看| 亚洲不卡av一区二区三区| 日韩欧美成人午夜| 成人午夜免费视频| 国产精品久久久久久亚洲伦| 一本到不卡精品视频在线观看| 久久一二三国产| 不卡电影免费在线播放一区| 亚洲不卡av一区二区三区| 日韩欧美国产午夜精品| 91小视频免费看| 久久99蜜桃精品| 亚洲国产精品久久艾草纯爱| 久久久亚洲精品一区二区三区| 欧美综合亚洲图片综合区| 国产精品1区2区3区在线观看| 一级做a爱片久久| 欧美国产一区二区在线观看| 欧美电影免费观看高清完整版在线| 91碰在线视频| 国产一区二区毛片| 韩国一区二区在线观看| 亚洲国产综合91精品麻豆| 亚洲欧美成aⅴ人在线观看 | 一区二区三区四区国产精品| 国产自产高清不卡| 久久精品国产一区二区| 亚洲欧洲韩国日本视频| 中文字幕乱码久久午夜不卡| 精品精品国产高清a毛片牛牛 | 久久99精品一区二区三区| 亚洲精品videosex极品| 久久久欧美精品sm网站| 日韩手机在线导航| 欧美精品一区二区三区蜜桃| 欧美电影精品一区二区| 久久精品无码一区二区三区| 国产欧美精品在线观看| 国产精品少妇自拍| 久久久久久久精| 成人欧美一区二区三区视频网页 | 亚洲国产一区二区视频| 成人欧美一区二区三区视频网页 | 亚洲国产精品一区二区久久恐怖片| 亚洲综合免费观看高清完整版在线 | 精品一区二区三区香蕉蜜桃| 日本aⅴ亚洲精品中文乱码| 精品在线免费视频| 本田岬高潮一区二区三区| 欧美婷婷六月丁香综合色| 精品国产亚洲一区二区三区在线观看| 中文字幕欧美激情| 偷窥少妇高潮呻吟av久久免费| 国产成人一区在线| 3atv在线一区二区三区| 国产精品国产三级国产三级人妇| 亚洲丶国产丶欧美一区二区三区| 激情综合网激情| 精品奇米国产一区二区三区| 久久精品欧美日韩精品| 麻豆一区二区三| 4438成人网| 亚洲va欧美va国产va天堂影院| 91色在线porny| 一区二区三区中文在线观看| 99riav一区二区三区| 亚洲免费电影在线| 色综合久久中文字幕综合网| 亚洲精品日韩专区silk| a亚洲天堂av| 亚洲第一狼人社区| 欧美一区二区在线看| 亚洲乱码一区二区三区在线观看| 精品国产91久久久久久久妲己| 欧美性生交片4| 国产亚洲精品资源在线26u| 日韩电影免费一区| wwwwww.欧美系列| 成人免费视频视频在线观看免费| 2022国产精品视频| 99久久99久久精品免费观看 | 中文在线资源观看网站视频免费不卡| 国产99久久久国产精品潘金 | 欧美女孩性生活视频| 国产精品一二三四| 亚洲欧美韩国综合色| 日韩欧美高清在线| 成人国产精品视频| 亚洲成人动漫一区|