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

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

?? newsgroup.java

?? 一個用Java開發的Web郵局
?? JAVA
字號:
/*
 * Newsgroup.java
 * Copyright (C) 1999 dog <dog@dog.net.uk>
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 * 
 * You may retrieve the latest version of this library from
 * http://www.dog.net.uk/knife/
 */

package dog.mail.nntp;

import java.io.*;
import java.util.*;
import javax.mail.*;
import javax.mail.event.*;

/**
 * The folder class implementing the NNTP mail protocol.
 *
 * @author dog@dog.net.uk
 * @version 1.2
 */
public class Newsgroup extends Folder {

	String name;
	int count = -1;
	int first = -1;
	int last = -1;
	boolean postingAllowed = false;
	boolean subscribed = false;
	String newsrcline;

	boolean open = false;

	Article[] articles;
	Date checkpoint;

	/**
	 * Constructor.
	 */
	protected Newsgroup(Store store, String name) {
		super(store);
		this.name = name;
	}

	/**
	 * Constructor.
	 */
	protected Newsgroup(Store store, String name, int count, int first, int last) {
		super(store);
		this.name = name;
		this.count = count;
		this.first = first;
		this.last = last;
	}

	/**
	 * Returns the name of this folder.
	 */
	public String getName() {
		return name;
	}

	/**
	 * Returns the full name of this folder.
	 */
	public String getFullName() {
		return getName();
	}

	/**
	 * Returns the type of this folder.
	 */
	public int getType() throws MessagingException {
		return HOLDS_MESSAGES;
	}

	/**
	 * Indicates whether this folder exists.
	 */
	public boolean exists() throws MessagingException {
		if (open) return true;
		try {
			open(READ_ONLY);
			close(false);
			return true;
		} catch (MessagingException e) {
			return false;
		}
	}

	/**
	 * Indicates whether this folder contains any new articles.
	 */
	public boolean hasNewMessages() throws MessagingException {
		return getNewMessageCount()>0;
	}

	/**
	 * Opens this folder.
	 */
	public void open(int mode) throws MessagingException {
		if (open)
			throw new MessagingException("Newsgroup is already open");
		if (mode!=READ_ONLY)
			throw new MessagingException("Newsgroup is read-only");
		((NNTPStore)store).open(this);
		open = true;
		notifyConnectionListeners(ConnectionEvent.OPENED);
		
	}

	/**
	 * Closes this folder.
	 */
	public void close(boolean expunge) throws MessagingException {
		if (!open)
			throw new MessagingException("Newsgroup is not open");
        if (expunge) expunge();
		((NNTPStore)store).close(this);
		open = false;
		notifyConnectionListeners(ConnectionEvent.CLOSED);
	}

	/**
	 * Expunges this folder.
	 */
	public Message[] expunge() throws MessagingException {
        throw new MessagingException("Newsgroup is read-only");	
	}

	/**
	 * Indicates whether this folder is open.
	 */
	public boolean isOpen() {
		return open;
	}

	/**
	 * Indicates whether this folder is subscribed.
	 */
	public boolean isSubscribed() {
		return subscribed;
	}

	/**
	 * Returns the permanent flags for this folder.
	 */
	public Flags getPermanentFlags() { return new Flags(); }
	
	/**
	 * Returns the number of articles in this folder.
	 */
	public int getMessageCount() throws MessagingException {
		return getMessages().length;
	}

	/**
	 * Returns the articles in this folder.
	 */
	public Message[] getMessages() throws MessagingException {
		if (!open)
			throw new MessagingException("Newsgroup is not open");
        NNTPStore s = (NNTPStore)store;
		if (articles==null)
			articles = s.getArticles(this);
		else { // check for new articles
			Article[] nm = s.getNewArticles(this, checkpoint);
			if (nm.length>0) {
				Article[] m2 = new Article[articles.length+nm.length];
				System.arraycopy(articles, 0, m2, 0, articles.length);
				System.arraycopy(nm, 0, m2, articles.length, nm.length);
				articles = m2;
			}
		}
		checkpoint = new Date();
        return articles;
	}
	
	/**
	 * Returns the specified article in this folder.
	 * Since NNTP articles are not stored in sequential order,
	 * the effect is just to reference articles returned by getMessages().
	 */
	public Message getMessage(int msgnum) throws MessagingException {
		return getMessages()[msgnum-1];
	}
	
	/**
	 * NNTP folders are read-only.
	 */
	public void appendMessages(Message articles[]) throws MessagingException {
		throw new MessagingException("Folder is read-only");
	}

	/**
	 * Does nothing.
	 */
	public void fetch(Message articles[], FetchProfile fetchprofile) throws MessagingException {
	}

	// -- These must be overridden to throw exceptions --

	/**
	 * NNTP folders can't have parents.
	 */
	public Folder getParent() throws MessagingException {
		throw new MessagingException("Newsgroup can't have a parent");
	}

	/**
	 * NNTP folders can't contain subfolders.
	 */
	public Folder[] list(String s) throws MessagingException {
		throw new MessagingException("Newsgroups can't contain subfolders");
	}

	/**
	 * NNTP folders can't contain subfolders.
	 */
	public Folder getFolder(String s) throws MessagingException {
		throw new MessagingException("Newsgroups can't contain subfolders");
	}

	/**
	 * NNTP folders can't contain subfolders.
	 */
	public char getSeparator() throws MessagingException {
		throw new MessagingException("Newsgroups can't contain subfolders");
	}

	/**
	 * NNTP folders can't be created, deleted, or renamed.
	 */
	public boolean create(int i) throws MessagingException {
		throw new MessagingException("Newsgroups can't be created");
	}

	/**
	 * NNTP folders can't be created, deleted, or renamed.
	 */
	public boolean delete(boolean flag) throws MessagingException {
		throw new MessagingException("Newsgroups can't be deleted");
	}

	/**
	 * NNTP folders can't be created, deleted, or renamed.
	 */
	public boolean renameTo(Folder folder) throws MessagingException {
		throw new MessagingException("Newsgroups can't be renamed");
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产福利| 亚洲乱码日产精品bd| 日韩一区中文字幕| 水蜜桃久久夜色精品一区的特点| 国产乱国产乱300精品| 欧美在线观看一区| 国产精品免费看片| 久久丁香综合五月国产三级网站 | 色综合天天综合网天天看片| 日韩午夜电影av| 一区二区高清在线| 99久久精品免费看国产| 久久精品一区蜜桃臀影院| 蜜臀精品久久久久久蜜臀| 在线免费不卡电影| 综合亚洲深深色噜噜狠狠网站| 精品影院一区二区久久久| 欧美另类高清zo欧美| 亚洲精品视频一区二区| 不卡的av在线播放| 久久精品欧美一区二区三区麻豆| 日本午夜精品一区二区三区电影| 欧美日韩国产综合久久| 亚洲精品高清在线观看| 色系网站成人免费| 亚洲青青青在线视频| 豆国产96在线|亚洲| 国产日产欧美一区二区三区 | 7777精品伊人久久久大香线蕉| 亚洲欧洲性图库| 懂色av中文一区二区三区| 国产片一区二区三区| 国产精品一区二区黑丝| 久久综合九色综合欧美就去吻| 久久精品国产免费看久久精品| 精品久久五月天| 国产一区二区久久| 国产亚洲一区二区三区四区 | www国产精品av| 国产sm精品调教视频网站| 久久精品视频网| 国产91对白在线观看九色| 国产精品麻豆网站| 91免费看视频| 亚洲第一电影网| 欧美www视频| 成人黄色软件下载| 亚洲一区电影777| 日韩午夜激情免费电影| 国产乱子伦一区二区三区国色天香| 国产日韩欧美精品综合| 91麻豆精东视频| 肉丝袜脚交视频一区二区| 欧美岛国在线观看| 成人h版在线观看| 亚洲国产精品久久一线不卡| 日韩欧美一区二区在线视频| 国产精品888| 亚洲图片欧美色图| 精品卡一卡二卡三卡四在线| 97久久精品人人做人人爽50路| 亚洲成人激情自拍| 国产欧美精品日韩区二区麻豆天美| 99国产精品视频免费观看| 日韩影视精彩在线| 国产精品热久久久久夜色精品三区 | 石原莉奈一区二区三区在线观看| 欧美videos中文字幕| av激情综合网| 久久aⅴ国产欧美74aaa| 成人欧美一区二区三区白人| 91麻豆精品国产91久久久| 东方欧美亚洲色图在线| 日韩精品国产精品| 亚洲欧美综合另类在线卡通| 91精品国产欧美一区二区| fc2成人免费人成在线观看播放| 日韩精品国产精品| 亚洲精品一二三四区| 久久久美女毛片| 欧美精品1区2区| 99精品一区二区| 国产在线精品不卡| 日韩精品电影一区亚洲| 亚洲人成在线播放网站岛国| 欧美videos大乳护士334| 欧美日韩一区二区电影| av亚洲精华国产精华| 国产乱码精品一区二区三区五月婷| 性久久久久久久久| 亚洲日本一区二区| 久久精品亚洲精品国产欧美kt∨ | 99综合影院在线| 韩国理伦片一区二区三区在线播放 | 蜜臀av亚洲一区中文字幕| 亚洲人精品午夜| 日韩一区在线播放| 国产精品国产精品国产专区不蜜 | 最好看的中文字幕久久| 欧美国产精品专区| 久久久www成人免费毛片麻豆 | 欧美日韩午夜在线| 色屁屁一区二区| 国产99久久久久久免费看农村| 麻豆91精品91久久久的内涵| 午夜av电影一区| 亚洲不卡av一区二区三区| 一区二区三区在线免费播放| 中文字幕日韩欧美一区二区三区| 久久久久久**毛片大全| 久久久99免费| 亚洲国产精品成人综合 | 欧美一区2区视频在线观看| 欧美日韩一级大片网址| 在线观看日韩av先锋影音电影院| 色综合天天天天做夜夜夜夜做| 不卡的看片网站| 99re在线精品| 91麻豆国产香蕉久久精品| 色狠狠桃花综合| 色88888久久久久久影院按摩| 色诱视频网站一区| 91官网在线观看| 欧美日韩免费一区二区三区| 欧美日韩国产在线播放网站| 欧美一区二区播放| 久久综合九色综合欧美98| 中文字幕乱码一区二区免费| 日本一二三不卡| 亚洲精品va在线观看| 日韩影视精彩在线| 激情六月婷婷久久| 国产东北露脸精品视频| 99精品国产热久久91蜜凸| 在线视频国产一区| 欧美一卡2卡3卡4卡| 久久久久久久久久久久久夜| 国产欧美视频一区二区三区| 亚洲欧美成aⅴ人在线观看| 亚洲电影一区二区三区| 奇米色一区二区| 成人免费视频播放| 欧美三级韩国三级日本三斤| 日韩欧美国产成人一区二区| 国产精品女同互慰在线看| 亚洲综合无码一区二区| 美女尤物国产一区| www.综合网.com| 制服.丝袜.亚洲.另类.中文| 国产亚洲欧美一区在线观看| 亚洲精品自拍动漫在线| 美女被吸乳得到大胸91| 94-欧美-setu| 日韩亚洲欧美在线| 最新欧美精品一区二区三区| 日韩专区在线视频| 成人免费精品视频| 91精品啪在线观看国产60岁| 中文字幕不卡三区| 亚州成人在线电影| 不卡影院免费观看| 欧美一区二区黄色| 亚洲激情第一区| 国产乱码精品一区二区三区五月婷| 91久久国产综合久久| 亚洲精品一线二线三线无人区| 亚洲精品网站在线观看| 高清国产一区二区三区| 制服.丝袜.亚洲.另类.中文| 亚洲免费在线看| 粉嫩绯色av一区二区在线观看| 3d成人动漫网站| 亚洲免费在线播放| 国产精品18久久久久久久网站| 欧美精品日韩一区| 亚洲精品视频在线| 成人国产电影网| 久久综合色婷婷| 日本成人在线看| 欧美日韩一区不卡| 亚洲一区二区在线免费看| 成人av电影免费在线播放| 久久伊人蜜桃av一区二区| 日av在线不卡| 欧美色视频在线| 一区二区国产盗摄色噜噜| 成人白浆超碰人人人人| 26uuuu精品一区二区| 精品综合免费视频观看| 欧美一区二区三区免费在线看| 亚洲一区二区三区爽爽爽爽爽 | 亚洲欧美色综合| 91成人免费在线| 亚洲精品成a人| 在线欧美日韩国产| 一区二区三区蜜桃| 色综合网站在线| 亚洲乱码中文字幕| 欧美在线观看视频一区二区| 亚洲最大的成人av|