亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
亚洲欧美视频在线观看| 久久久影视传媒| 天堂久久久久va久久久久| 日韩一区二区在线播放| 琪琪一区二区三区| 777久久久精品| 国产精品99久久久久| 亚洲精品欧美激情| 欧美电影影音先锋| 国产美女一区二区三区| 亚洲精品视频在线观看免费| 日本大香伊一区二区三区| 一区二区三区不卡视频在线观看 | 国产中文字幕精品| 亚洲同性gay激情无套| 91亚洲精品久久久蜜桃| 五月激情综合色| 亚洲人成7777| 国产视频视频一区| 欧美电影一区二区| 欧美日韩亚洲综合在线 | 久久精品在线免费观看| 99精品国产91久久久久久| 国产电影精品久久禁18| 精品一区二区三区免费视频| 亚洲欧美日韩国产成人精品影院| 久久久国产午夜精品| 欧美精品免费视频| 欧美亚洲综合一区| 成人免费的视频| 国产精品一区久久久久| 韩国精品在线观看| 成人免费毛片片v| 99国产一区二区三精品乱码| 成人中文字幕合集| 成人sese在线| 欧美色网站导航| 欧美日本免费一区二区三区| 欧美日本国产一区| 欧美猛男超大videosgay| 91.麻豆视频| 久久九九久久九九| 一区二区三区色| 久久国产综合精品| 色婷婷综合五月| 欧美精品一区二区不卡| 国产精品美女久久久久aⅴ| 亚洲综合在线电影| 国产成人自拍在线| 欧美日韩一区二区电影| 日韩一级二级三级| 中文字幕中文字幕在线一区 | 国产精品私房写真福利视频| 国产精品久久久久久久浪潮网站| 奇米888四色在线精品| 免费xxxx性欧美18vr| 不卡一二三区首页| 日韩一区二区三区四区| 一区二区三区中文字幕在线观看| 免费观看91视频大全| 成人黄色免费短视频| 欧美精品乱码久久久久久按摩| 欧美日韩另类一区| 久久久久久久久久电影| 奇米一区二区三区av| 欧美在线小视频| 国产天堂亚洲国产碰碰| 激情图片小说一区| 欧美成人bangbros| 亚洲高清免费观看 | 国产精品不卡一区二区三区| 日韩在线一区二区三区| 欧美性猛交xxxx黑人交| 亚洲欧美综合网| 91麻豆6部合集magnet| 国产精品视频一二三| 麻豆成人久久精品二区三区小说| 欧美日韩国产bt| 午夜视频在线观看一区| 91.麻豆视频| 精品制服美女丁香| 中文字幕久久午夜不卡| 成人av片在线观看| 亚洲一区影音先锋| 91精品国产综合久久久久久久 | 国产精品自拍一区| 亚洲一卡二卡三卡四卡无卡久久| 99久久久国产精品免费蜜臀| 亚洲成a人片综合在线| 久久精品欧美日韩精品| 精品欧美一区二区三区精品久久 | 国产精品区一区二区三区| 欧美视频一区二区在线观看| 国产精品资源在线看| 亚洲午夜激情网页| 天堂成人免费av电影一区| 日韩美女啊v在线免费观看| 久久精品网站免费观看| 欧美久久久久久久久| 欧美日韩视频在线第一区 | 一区二区三区不卡在线观看| 亚洲精品一区二区精华| 欧美mv日韩mv| 欧美精品一区二区三区四区 | 在线一区二区三区四区五区 | 国产精品一区二区三区乱码| 免费观看30秒视频久久| 久久国产精品一区二区| 国产在线不卡一区| 另类的小说在线视频另类成人小视频在线 | 亚洲色图另类专区| 国产精品三级电影| 亚洲一区二区成人在线观看| 香蕉成人伊视频在线观看| 婷婷开心激情综合| 黄一区二区三区| 日本精品一区二区三区四区的功能| 91麻豆蜜桃一区二区三区| 国产精品原创巨作av| 成人激情动漫在线观看| 欧美日韩中文字幕一区| 3atv一区二区三区| 精品免费日韩av| 国产区在线观看成人精品 | 国产亚洲精品bt天堂精选| 日韩欧美国产综合一区| 国产精品卡一卡二卡三| 日本三级亚洲精品| 99v久久综合狠狠综合久久| 91国内精品野花午夜精品| 中文字幕av免费专区久久| 美女久久久精品| 欧美一级搡bbbb搡bbbb| 免费看欧美美女黄的网站| 欧美午夜影院一区| 性欧美大战久久久久久久久| 色婷婷精品大视频在线蜜桃视频| 欧美精品久久一区二区三区| 欧美亚洲一区二区在线| 国产精品综合在线视频| 久久精品一区二区三区av| 国产一区在线观看麻豆| 久久九九国产精品| 99国产精品久久久久久久久久久| 欧美高清一级片在线观看| 91在线观看免费视频| 亚洲午夜国产一区99re久久| 91精品黄色片免费大全| 久久国产成人午夜av影院| 国产女主播一区| 亚洲一区二区视频在线| 午夜av一区二区| 国产成人精品www牛牛影视| 色94色欧美sute亚洲线路二 | 色综合欧美在线视频区| 国产亚洲成av人在线观看导航| 久久99精品国产.久久久久久| 日韩免费一区二区三区在线播放| 免费在线看成人av| 精品国产乱码久久久久久久| 丁香亚洲综合激情啪啪综合| 亚洲欧美日韩国产成人精品影院| 在线综合+亚洲+欧美中文字幕| 视频一区二区三区入口| 精品日韩一区二区| 91在线精品一区二区| 亚洲成av人在线观看| 久久久久久久久久久久久女国产乱 | 欧美日韩一区二区三区视频| 视频一区二区中文字幕| 精品国内二区三区| 色综合久久综合网97色综合| 午夜精品一区在线观看| 精品久久久久久综合日本欧美| www.亚洲激情.com| 国产成人免费高清| 久久精品国产成人一区二区三区| 亚洲天堂中文字幕| 国产香蕉久久精品综合网| 欧美图区在线视频| 色综合天天综合| 成人一区在线看| 久久99久久久久久久久久久| 国产亚洲成年网址在线观看| 欧美一区二区三区日韩视频| 成人av网址在线| 精品一区二区免费在线观看| 亚洲国产综合色| 国产精品不卡在线| 成人动漫视频在线| 精品一区二区三区在线视频| 久久精品夜色噜噜亚洲aⅴ| 91麻豆精品国产91久久久久久久久| 91免费在线看| 91麻豆精东视频| 欧美日本精品一区二区三区| 欧美手机在线视频| 在线成人av影院| 国产欧美一区二区精品性色超碰| 日韩欧美亚洲另类制服综合在线|