javax.mail_1.4.0.v201005080615

16:37:07.593 INFO  jd.cli.Main - Decompiling javax.mail_1.4.0.v201005080615.jar
package javax.mail;

import java.io.Serializable;

public abstract class Address
  implements Serializable
{
  public abstract boolean equals(Object paramObject);
  
  public abstract String getType();
  
  public abstract String toString();
}

/* Location:
 * Qualified Name:     javax.mail.Address
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class AuthenticationFailedException
  extends MessagingException
{
  public AuthenticationFailedException() {}
  
  public AuthenticationFailedException(String message)
  {
    super(message);
  }
}

/* Location:
 * Qualified Name:     javax.mail.AuthenticationFailedException
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

import java.net.InetAddress;

public abstract class Authenticator
{
  private InetAddress host;
  private int port;
  private String prompt;
  private String protocol;
  private String username;
  
  synchronized PasswordAuthentication authenticate(InetAddress host, int port, String protocol, String prompt, String username)
  {
    this.host = host;
    this.port = port;
    this.protocol = protocol;
    this.prompt = prompt;
    this.username = username;
    return getPasswordAuthentication();
  }
  
  protected final String getDefaultUserName()
  {
    return username;
  }
  
  protected PasswordAuthentication getPasswordAuthentication()
  {
    return null;
  }
  
  protected final int getRequestingPort()
  {
    return port;
  }
  
  protected final String getRequestingPrompt()
  {
    return prompt;
  }
  
  protected final String getRequestingProtocol()
  {
    return protocol;
  }
  
  protected final InetAddress getRequestingSite()
  {
    return host;
  }
}

/* Location:
 * Qualified Name:     javax.mail.Authenticator
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public abstract class BodyPart
  implements Part
{
  protected Multipart parent;
  
  public Multipart getParent()
  {
    return parent;
  }
  
  void setParent(Multipart parent)
  {
    this.parent = parent;
  }
}

/* Location:
 * Qualified Name:     javax.mail.BodyPart
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

import java.util.List;
import javax.mail.event.MailEvent;

class EventQueue
{
  void queueEvent(MailEvent event, List listeners)
  {
    for (int i = 0; i < listeners.size(); i++) {
      event.dispatch(listeners.get(i));
    }
  }
  
  void stop() {}
}

/* Location:
 * Qualified Name:     javax.mail.EventQueue
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class FetchProfile$Item
{
  public static final Item CONTENT_INFO = new Item("Content-Info");
  public static final Item ENVELOPE = new Item("Envelope");
  public static final Item FLAGS = new Item("Flags");
  
  protected FetchProfile$Item(String name) {}
}

/* Location:
 * Qualified Name:     javax.mail.FetchProfile.Item
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

import java.util.ArrayList;
import java.util.List;

public class FetchProfile
{
  public static class Item
  {
    public static final Item CONTENT_INFO = new Item("Content-Info");
    public static final Item ENVELOPE = new Item("Envelope");
    public static final Item FLAGS = new Item("Flags");
    
    protected Item(String name) {}
  }
  
  private final List items = new ArrayList();
  private final List headers = new ArrayList();
  
  public void add(Item item)
  {
    items.add(item);
  }
  
  public void add(String header)
  {
    headers.add(header);
  }
  
  public boolean contains(Item item)
  {
    return items.contains(item);
  }
  
  public boolean contains(String header)
  {
    return headers.contains(header);
  }
  
  public Item[] getItems()
  {
    return (Item[])items.toArray(new Item[items.size()]);
  }
  
  public String[] getHeaderNames()
  {
    return (String[])headers.toArray(new String[headers.size()]);
  }
}

/* Location:
 * Qualified Name:     javax.mail.FetchProfile
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public final class Flags$Flag
{
  public static final Flag ANSWERED = new Flag(1);
  public static final Flag DELETED = new Flag(2);
  public static final Flag DRAFT = new Flag(4);
  public static final Flag FLAGGED = new Flag(8);
  public static final Flag RECENT = new Flag(16);
  public static final Flag SEEN = new Flag(32);
  public static final Flag USER = new Flag(Integer.MIN_VALUE);
  private final int mask;
  
  private Flags$Flag(int mask)
  {
    this.mask = mask;
  }
}

/* Location:
 * Qualified Name:     javax.mail.Flags.Flag
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

import java.io.Serializable;
import java.util.Collection;
import java.util.Hashtable;
import java.util.Set;

public class Flags
  implements Cloneable, Serializable
{
  private int system_flags;
  private final Hashtable user_flags;
  
  public static final class Flag
  {
    public static final Flag ANSWERED = new Flag(1);
    public static final Flag DELETED = new Flag(2);
    public static final Flag DRAFT = new Flag(4);
    public static final Flag FLAGGED = new Flag(8);
    public static final Flag RECENT = new Flag(16);
    public static final Flag SEEN = new Flag(32);
    public static final Flag USER = new Flag(Integer.MIN_VALUE);
    private final int mask;
    
    private Flag(int mask)
    {
      this.mask = mask;
    }
  }
  
  public Flags()
  {
    user_flags = new Hashtable();
  }
  
  public Flags(Flag flag)
  {
    system_flags = mask;
    user_flags = new Hashtable();
  }
  
  public Flags(Flags flags)
  {
    system_flags = system_flags;
    user_flags = new Hashtable(user_flags);
  }
  
  public Flags(String name)
  {
    user_flags = new Hashtable();
    user_flags.put(name.toLowerCase(), name);
  }
  
  public void add(Flag flag)
  {
    system_flags |= mask;
  }
  
  public void add(Flags flags)
  {
    system_flags |= system_flags;
    user_flags.putAll(user_flags);
  }
  
  public void add(String name)
  {
    user_flags.put(name.toLowerCase(), name);
  }
  
  public Object clone()
  {
    return new Flags(this);
  }
  
  public boolean contains(Flag flag)
  {
    return (system_flags & mask) != 0;
  }
  
  public boolean contains(Flags flags)
  {
    return ((system_flags & system_flags) == system_flags) && (user_flags.keySet().containsAll(user_flags.keySet()));
  }
  
  public boolean contains(String name)
  {
    return user_flags.containsKey(name.toLowerCase());
  }
  
  public boolean equals(Object other)
  {
    if (other == this) {
      return true;
    }
    if (!(other instanceof Flags)) {
      return false;
    }
    Flags flags = (Flags)other;
    return (system_flags == system_flags) && (user_flags.keySet().equals(user_flags.keySet()));
  }
  
  public int hashCode()
  {
    return system_flags ^ user_flags.keySet().hashCode();
  }
  
  public Flag[] getSystemFlags()
  {
    int size = 0;
    if ((system_flags & ANSWEREDmask) != 0) {
      size++;
    }
    if ((system_flags & DELETEDmask) != 0) {
      size++;
    }
    if ((system_flags & DRAFTmask) != 0) {
      size++;
    }
    if ((system_flags & FLAGGEDmask) != 0) {
      size++;
    }
    if ((system_flags & RECENTmask) != 0) {
      size++;
    }
    if ((system_flags & SEENmask) != 0) {
      size++;
    }
    if ((system_flags & USERmask) != 0) {
      size++;
    }
    Flag[] result = new Flag[size];
    if ((system_flags & USERmask) != 0) {
      result[(--size)] = Flag.USER;
    }
    if ((system_flags & SEENmask) != 0) {
      result[(--size)] = Flag.SEEN;
    }
    if ((system_flags & RECENTmask) != 0) {
      result[(--size)] = Flag.RECENT;
    }
    if ((system_flags & FLAGGEDmask) != 0) {
      result[(--size)] = Flag.FLAGGED;
    }
    if ((system_flags & DRAFTmask) != 0) {
      result[(--size)] = Flag.DRAFT;
    }
    if ((system_flags & DELETEDmask) != 0) {
      result[(--size)] = Flag.DELETED;
    }
    if ((system_flags & ANSWEREDmask) != 0) {
      result[(--size)] = Flag.ANSWERED;
    }
    return result;
  }
  
  public String[] getUserFlags()
  {
    return (String[])user_flags.values().toArray(new String[user_flags.values().size()]);
  }
  
  public void remove(Flag flag)
  {
    system_flags &= (mask ^ 0xFFFFFFFF);
  }
  
  public void remove(Flags flags)
  {
    system_flags &= (system_flags ^ 0xFFFFFFFF);
    user_flags.keySet().removeAll(user_flags.keySet());
  }
  
  public void remove(String name)
  {
    user_flags.remove(name.toLowerCase());
  }
}

/* Location:
 * Qualified Name:     javax.mail.Flags
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

import java.util.ArrayList;
import java.util.List;
import javax.mail.event.ConnectionEvent;
import javax.mail.event.ConnectionListener;
import javax.mail.event.FolderEvent;
import javax.mail.event.FolderListener;
import javax.mail.event.MessageChangedEvent;
import javax.mail.event.MessageChangedListener;
import javax.mail.event.MessageCountEvent;
import javax.mail.event.MessageCountListener;
import javax.mail.search.SearchTerm;

public abstract class Folder
{
  public static final int HOLDS_MESSAGES = 1;
  public static final int HOLDS_FOLDERS = 2;
  public static final int READ_ONLY = 1;
  public static final int READ_WRITE = 2;
  protected Store store;
  protected int mode = -1;
  private final List connectionListeners = new ArrayList(2);
  private final List folderListeners = new ArrayList(2);
  private final List messageChangedListeners = new ArrayList(2);
  private final List messageCountListeners = new ArrayList(2);
  private final EventQueue queue = new EventQueue();
  
  protected Folder(Store store)
  {
    this.store = store;
  }
  
  public abstract String getName();
  
  public abstract String getFullName();
  
  public URLName getURLName()
    throws MessagingException
  {
    return store.getURLName();
  }
  
  public Store getStore()
  {
    return store;
  }
  
  public abstract Folder getParent()
    throws MessagingException;
  
  public abstract boolean exists()
    throws MessagingException;
  
  public abstract Folder[] list(String paramString)
    throws MessagingException;
  
  public Folder[] listSubscribed(String pattern)
    throws MessagingException
  {
    return list(pattern);
  }
  
  public Folder[] list()
    throws MessagingException
  {
    return list("%");
  }
  
  public Folder[] listSubscribed()
    throws MessagingException
  {
    return listSubscribed("%");
  }
  
  public abstract char getSeparator()
    throws MessagingException;
  
  public abstract int getType()
    throws MessagingException;
  
  public abstract boolean create(int paramInt)
    throws MessagingException;
  
  public boolean isSubscribed()
  {
    return true;
  }
  
  public void setSubscribed(boolean subscribed)
    throws MessagingException
  {
    throw new MethodNotSupportedException();
  }
  
  public abstract boolean hasNewMessages()
    throws MessagingException;
  
  public abstract Folder getFolder(String paramString)
    throws MessagingException;
  
  public abstract boolean delete(boolean paramBoolean)
    throws MessagingException;
  
  public abstract boolean renameTo(Folder paramFolder)
    throws MessagingException;
  
  public abstract void open(int paramInt)
    throws MessagingException;
  
  public abstract void close(boolean paramBoolean)
    throws MessagingException;
  
  public abstract boolean isOpen();
  
  public int getMode()
  {
    return mode;
  }
  
  public abstract Flags getPermanentFlags();
  
  public abstract int getMessageCount()
    throws MessagingException;
  
  public int getNewMessageCount()
    throws MessagingException
  {
    return getCount(Flags.Flag.RECENT, true);
  }
  
  public int getUnreadMessageCount()
    throws MessagingException
  {
    return getCount(Flags.Flag.SEEN, false);
  }
  
  public int getDeletedMessageCount()
    throws MessagingException
  {
    return getCount(Flags.Flag.DELETED, true);
  }
  
  private int getCount(Flags.Flag flag, boolean value)
    throws MessagingException
  {
    if (!isOpen()) {
      return -1;
    }
    Message[] messages = getMessages();
    int total = 0;
    for (int i = 0; i < messages.length; i++) {
      if (messages[i].getFlags().contains(flag) == value) {
        total++;
      }
    }
    return total;
  }
  
  public abstract Message getMessage(int paramInt)
    throws MessagingException;
  
  public Message[] getMessages(int start, int end)
    throws MessagingException
  {
    Message[] result = new Message[end - start + 1];
    for (int i = 0; i < result.length; i++) {
      result[i] = getMessage(start++);
    }
    return result;
  }
  
  public Message[] getMessages(int[] ids)
    throws MessagingException
  {
    Message[] result = new Message[ids.length];
    for (int i = 0; i < ids.length; i++) {
      result[i] = getMessage(ids[i]);
    }
    return result;
  }
  
  public Message[] getMessages()
    throws MessagingException
  {
    return getMessages(1, getMessageCount());
  }
  
  public abstract void appendMessages(Message[] paramArrayOfMessage)
    throws MessagingException;
  
  public void fetch(Message[] messages, FetchProfile profile)
    throws MessagingException
  {}
  
  public void setFlags(Message[] messages, Flags flags, boolean value)
    throws MessagingException
  {
    for (int i = 0; i < messages.length; i++)
    {
      Message message = messages[i];
      message.setFlags(flags, value);
    }
  }
  
  public void setFlags(int start, int end, Flags flags, boolean value)
    throws MessagingException
  {
    for (int i = start; i <= end; i++)
    {
      Message message = getMessage(i);
      message.setFlags(flags, value);
    }
  }
  
  public void setFlags(int[] ids, Flags flags, boolean value)
    throws MessagingException
  {
    for (int i = 0; i < ids.length; i++)
    {
      Message message = getMessage(ids[i]);
      message.setFlags(flags, value);
    }
  }
  
  public void copyMessages(Message[] messages, Folder folder)
    throws MessagingException
  {
    folder.appendMessages(messages);
  }
  
  public abstract Message[] expunge()
    throws MessagingException;
  
  public Message[] search(SearchTerm term)
    throws MessagingException
  {
    return search(term, getMessages());
  }
  
  public Message[] search(SearchTerm term, Message[] messages)
    throws MessagingException
  {
    List result = new ArrayList(messages.length);
    for (int i = 0; i < messages.length; i++)
    {
      Message message = messages[i];
      if (message.match(term)) {
        result.add(message);
      }
    }
    return (Message[])result.toArray(new Message[result.size()]);
  }
  
  public void addConnectionListener(ConnectionListener listener)
  {
    connectionListeners.add(listener);
  }
  
  public void removeConnectionListener(ConnectionListener listener)
  {
    connectionListeners.remove(listener);
  }
  
  protected void notifyConnectionListeners(int type)
  {
    queue.queueEvent(new ConnectionEvent(this, type), connectionListeners);
  }
  
  public void addFolderListener(FolderListener listener)
  {
    folderListeners.add(listener);
  }
  
  public void removeFolderListener(FolderListener listener)
  {
    folderListeners.remove(listener);
  }
  
  protected void notifyFolderListeners(int type)
  {
    queue.queueEvent(new FolderEvent(this, this, type), folderListeners);
  }
  
  protected void notifyFolderRenamedListeners(Folder newFolder)
  {
    queue.queueEvent(new FolderEvent(this, this, newFolder, 3), folderListeners);
  }
  
  public void addMessageCountListener(MessageCountListener listener)
  {
    messageCountListeners.add(listener);
  }
  
  public void removeMessageCountListener(MessageCountListener listener)
  {
    messageCountListeners.remove(listener);
  }
  
  protected void notifyMessageAddedListeners(Message[] messages)
  {
    queue.queueEvent(new MessageCountEvent(this, 1, false, messages), messageChangedListeners);
  }
  
  protected void notifyMessageRemovedListeners(boolean removed, Message[] messages)
  {
    queue.queueEvent(new MessageCountEvent(this, 2, removed, messages), messageChangedListeners);
  }
  
  public void addMessageChangedListener(MessageChangedListener listener)
  {
    messageChangedListeners.add(listener);
  }
  
  public void removeMessageChangedListener(MessageChangedListener listener)
  {
    messageChangedListeners.remove(listener);
  }
  
  protected void notifyMessageChangedListeners(int type, Message message)
  {
    queue.queueEvent(new MessageChangedEvent(this, type, message), messageChangedListeners);
  }
  
  protected void finalize()
    throws Throwable
  {
    queue.stop();
    connectionListeners.clear();
    folderListeners.clear();
    messageChangedListeners.clear();
    messageCountListeners.clear();
    store = null;
    super.finalize();
  }
  
  public String toString()
  {
    String name = getFullName();
    return name == null ? super.toString() : name;
  }
}

/* Location:
 * Qualified Name:     javax.mail.Folder
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class FolderClosedException
  extends MessagingException
{
  private transient Folder _folder;
  
  public FolderClosedException(Folder folder)
  {
    this(folder, "Folder Closed: " + folder.getName());
  }
  
  public FolderClosedException(Folder folder, String message)
  {
    super(message);
    _folder = folder;
  }
  
  public Folder getFolder()
  {
    return _folder;
  }
}

/* Location:
 * Qualified Name:     javax.mail.FolderClosedException
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class FolderNotFoundException
  extends MessagingException
{
  private transient Folder _folder;
  
  public FolderNotFoundException() {}
  
  public FolderNotFoundException(Folder folder)
  {
    this(folder, "Folder not found: " + folder.getName());
  }
  
  public FolderNotFoundException(Folder folder, String message)
  {
    super(message);
    _folder = folder;
  }
  
  public FolderNotFoundException(String message, Folder folder)
  {
    this(folder, message);
  }
  
  public Folder getFolder()
  {
    return _folder;
  }
}

/* Location:
 * Qualified Name:     javax.mail.FolderNotFoundException
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class Header
{
  protected String name;
  protected String value;
  
  public Header(String name, String value)
  {
    this.name = name;
    this.value = value;
  }
  
  public String getName()
  {
    return name;
  }
  
  public String getValue()
  {
    return value;
  }
}

/* Location:
 * Qualified Name:     javax.mail.Header
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class IllegalWriteException
  extends MessagingException
{
  public IllegalWriteException() {}
  
  public IllegalWriteException(String message)
  {
    super(message);
  }
}

/* Location:
 * Qualified Name:     javax.mail.IllegalWriteException
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

import java.io.InvalidObjectException;
import java.io.ObjectStreamException;
import java.io.Serializable;

public class Message$RecipientType
  implements Serializable
{
  public static final RecipientType TO = new RecipientType("To");
  public static final RecipientType CC = new RecipientType("Cc");
  public static final RecipientType BCC = new RecipientType("Bcc");
  protected String type;
  
  protected Message$RecipientType(String type)
  {
    this.type = type;
  }
  
  protected Object readResolve()
    throws ObjectStreamException
  {
    if (type.equals("To")) {
      return TO;
    }
    if (type.equals("Cc")) {
      return CC;
    }
    if (type.equals("Bcc")) {
      return BCC;
    }
    throw new InvalidObjectException("Invalid RecipientType: " + type);
  }
  
  public String toString()
  {
    return type;
  }
}

/* Location:
 * Qualified Name:     javax.mail.Message.RecipientType
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

import java.io.InvalidObjectException;
import java.io.ObjectStreamException;
import java.io.Serializable;
import java.util.Date;
import javax.mail.search.SearchTerm;

public abstract class Message
  implements Part
{
  protected int msgnum;
  protected boolean expunged;
  protected Folder folder;
  protected Session session;
  protected Message() {}
  
  public static class RecipientType
    implements Serializable
  {
    public static final RecipientType TO = new RecipientType("To");
    public static final RecipientType CC = new RecipientType("Cc");
    public static final RecipientType BCC = new RecipientType("Bcc");
    protected String type;
    
    protected RecipientType(String type)
    {
      this.type = type;
    }
    
    protected Object readResolve()
      throws ObjectStreamException
    {
      if (type.equals("To")) {
        return TO;
      }
      if (type.equals("Cc")) {
        return CC;
      }
      if (type.equals("Bcc")) {
        return BCC;
      }
      throw new InvalidObjectException("Invalid RecipientType: " + type);
    }
    
    public String toString()
    {
      return type;
    }
  }
  
  protected Message(Folder folder, int msgnum)
  {
    this.folder = folder;
    this.msgnum = msgnum;
    
    session = folder.getStore().getSession();
  }
  
  protected Message(Session session)
  {
    this.session = session;
  }
  
  public abstract Address[] getFrom()
    throws MessagingException;
  
  public abstract void setFrom()
    throws MessagingException;
  
  public abstract void setFrom(Address paramAddress)
    throws MessagingException;
  
  public abstract void addFrom(Address[] paramArrayOfAddress)
    throws MessagingException;
  
  public abstract Address[] getRecipients(RecipientType paramRecipientType)
    throws MessagingException;
  
  public Address[] getAllRecipients()
    throws MessagingException
  {
    Address[] to = getRecipients(RecipientType.TO);
    Address[] cc = getRecipients(RecipientType.CC);
    Address[] bcc = getRecipients(RecipientType.BCC);
    if ((to == null) && (cc == null) && (bcc == null)) {
      return null;
    }
    int length = (to != null ? to.length : 0) + (cc != null ? cc.length : 0) + (bcc != null ? bcc.length : 0);
    Address[] result = new Address[length];
    int j = 0;
    if (to != null) {
      for (int i = 0; i < to.length; i++) {
        result[(j++)] = to[i];
      }
    }
    if (cc != null) {
      for (int i = 0; i < cc.length; i++) {
        result[(j++)] = cc[i];
      }
    }
    if (bcc != null) {
      for (int i = 0; i < bcc.length; i++) {
        result[(j++)] = bcc[i];
      }
    }
    return result;
  }
  
  public abstract void setRecipients(RecipientType paramRecipientType, Address[] paramArrayOfAddress)
    throws MessagingException;
  
  public void setRecipient(RecipientType type, Address address)
    throws MessagingException
  {
    setRecipients(type, new Address[] { address });
  }
  
  public abstract void addRecipients(RecipientType paramRecipientType, Address[] paramArrayOfAddress)
    throws MessagingException;
  
  public void addRecipient(RecipientType type, Address address)
    throws MessagingException
  {
    addRecipients(type, new Address[] { address });
  }
  
  public Address[] getReplyTo()
    throws MessagingException
  {
    return getFrom();
  }
  
  public void setReplyTo(Address[] addresses)
    throws MessagingException
  {
    throw new MethodNotSupportedException("setReplyTo not supported");
  }
  
  public abstract String getSubject()
    throws MessagingException;
  
  public abstract void setSubject(String paramString)
    throws MessagingException;
  
  public abstract Date getSentDate()
    throws MessagingException;
  
  public abstract void setSentDate(Date paramDate)
    throws MessagingException;
  
  public abstract Date getReceivedDate()
    throws MessagingException;
  
  public abstract Flags getFlags()
    throws MessagingException;
  
  public boolean isSet(Flags.Flag flag)
    throws MessagingException
  {
    return getFlags().contains(flag);
  }
  
  public abstract void setFlags(Flags paramFlags, boolean paramBoolean)
    throws MessagingException;
  
  public void setFlag(Flags.Flag flag, boolean set)
    throws MessagingException
  {
    setFlags(new Flags(flag), set);
  }
  
  public int getMessageNumber()
  {
    return msgnum;
  }
  
  protected void setMessageNumber(int number)
  {
    msgnum = number;
  }
  
  public Folder getFolder()
  {
    return folder;
  }
  
  public boolean isExpunged()
  {
    return expunged;
  }
  
  protected void setExpunged(boolean expunged)
  {
    this.expunged = expunged;
  }
  
  public abstract Message reply(boolean paramBoolean)
    throws MessagingException;
  
  public abstract void saveChanges()
    throws MessagingException;
  
  public boolean match(SearchTerm term)
    throws MessagingException
  {
    return term.match(this);
  }
}

/* Location:
 * Qualified Name:     javax.mail.Message
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public abstract interface MessageAware
{
  public abstract MessageContext getMessageContext();
}

/* Location:
 * Qualified Name:     javax.mail.MessageAware
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class MessageContext
{
  private final Part part;
  
  public MessageContext(Part part)
  {
    this.part = part;
  }
  
  public Part getPart()
  {
    return part;
  }
  
  public Message getMessage()
  {
    return getMessageFrom(part);
  }
  
  public Session getSession()
  {
    Message message = getMessage();
    if (message == null) {
      return null;
    }
    return session;
  }
  
  private Message getMessageFrom(Part p)
  {
    while (p != null)
    {
      if ((p instanceof Message)) {
        return (Message)p;
      }
      Multipart mp = ((BodyPart)p).getParent();
      if (mp == null) {
        return null;
      }
      p = mp.getParent();
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     javax.mail.MessageContext
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class MessageRemovedException
  extends MessagingException
{
  public MessageRemovedException() {}
  
  public MessageRemovedException(String message)
  {
    super(message);
  }
}

/* Location:
 * Qualified Name:     javax.mail.MessageRemovedException
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class MessagingException
  extends Exception
{
  private Exception next;
  
  public MessagingException() {}
  
  public MessagingException(String message)
  {
    super(message);
  }
  
  public MessagingException(String message, Exception cause)
  {
    super(message, cause);
    next = cause;
  }
  
  public Exception getNextException()
  {
    return next;
  }
  
  public synchronized boolean setNextException(Exception cause)
  {
    if (next == null)
    {
      initCause(cause);
      next = cause;
      return true;
    }
    if ((next instanceof MessagingException)) {
      return ((MessagingException)next).setNextException(cause);
    }
    return false;
  }
  
  public String getMessage()
  {
    Exception next = getNextException();
    if (next == null) {
      return super.getMessage();
    }
    return super.getMessage() + " (" + next.getClass().getName() + ": " + next.getMessage() + ")";
  }
}

/* Location:
 * Qualified Name:     javax.mail.MessagingException
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class MethodNotSupportedException
  extends MessagingException
{
  public MethodNotSupportedException() {}
  
  public MethodNotSupportedException(String message)
  {
    super(message);
  }
}

/* Location:
 * Qualified Name:     javax.mail.MethodNotSupportedException
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

import java.io.IOException;
import java.io.OutputStream;
import java.util.Vector;

public abstract class Multipart
{
  protected Vector parts = new Vector();
  protected String contentType = "multipart/mixed";
  protected Part parent;
  
  protected void setMultipartDataSource(MultipartDataSource mds)
    throws MessagingException
  {
    parts.clear();
    contentType = mds.getContentType();
    int size = mds.getCount();
    for (int i = 0; i < size; i++) {
      parts.add(mds.getBodyPart(i));
    }
  }
  
  public String getContentType()
  {
    return contentType;
  }
  
  public int getCount()
    throws MessagingException
  {
    return parts.size();
  }
  
  public BodyPart getBodyPart(int index)
    throws MessagingException
  {
    return (BodyPart)parts.get(index);
  }
  
  public boolean removeBodyPart(BodyPart part)
    throws MessagingException
  {
    return parts.remove(part);
  }
  
  public void removeBodyPart(int index)
    throws MessagingException
  {
    parts.remove(index);
  }
  
  public void addBodyPart(BodyPart part)
    throws MessagingException
  {
    parts.add(part);
  }
  
  public void addBodyPart(BodyPart part, int pos)
    throws MessagingException
  {
    parts.add(pos, part);
  }
  
  public abstract void writeTo(OutputStream paramOutputStream)
    throws IOException, MessagingException;
  
  public Part getParent()
  {
    return parent;
  }
  
  public void setParent(Part part)
  {
    parent = part;
  }
}

/* Location:
 * Qualified Name:     javax.mail.Multipart
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

import javax.activation.DataSource;

public abstract interface MultipartDataSource
  extends DataSource
{
  public abstract BodyPart getBodyPart(int paramInt)
    throws MessagingException;
  
  public abstract int getCount();
}

/* Location:
 * Qualified Name:     javax.mail.MultipartDataSource
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class NoSuchProviderException
  extends MessagingException
{
  public NoSuchProviderException() {}
  
  public NoSuchProviderException(String message)
  {
    super(message);
  }
}

/* Location:
 * Qualified Name:     javax.mail.NoSuchProviderException
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Enumeration;
import javax.activation.DataHandler;

public abstract interface Part
{
  public static final String ATTACHMENT = "attachment";
  public static final String INLINE = "inline";
  
  public abstract void addHeader(String paramString1, String paramString2)
    throws MessagingException;
  
  public abstract Enumeration getAllHeaders()
    throws MessagingException;
  
  public abstract Object getContent()
    throws IOException, MessagingException;
  
  public abstract String getContentType()
    throws MessagingException;
  
  public abstract DataHandler getDataHandler()
    throws MessagingException;
  
  public abstract String getDescription()
    throws MessagingException;
  
  public abstract String getDisposition()
    throws MessagingException;
  
  public abstract String getFileName()
    throws MessagingException;
  
  public abstract String[] getHeader(String paramString)
    throws MessagingException;
  
  public abstract InputStream getInputStream()
    throws IOException, MessagingException;
  
  public abstract int getLineCount()
    throws MessagingException;
  
  public abstract Enumeration getMatchingHeaders(String[] paramArrayOfString)
    throws MessagingException;
  
  public abstract Enumeration getNonMatchingHeaders(String[] paramArrayOfString)
    throws MessagingException;
  
  public abstract int getSize()
    throws MessagingException;
  
  public abstract boolean isMimeType(String paramString)
    throws MessagingException;
  
  public abstract void removeHeader(String paramString)
    throws MessagingException;
  
  public abstract void setContent(Multipart paramMultipart)
    throws MessagingException;
  
  public abstract void setContent(Object paramObject, String paramString)
    throws MessagingException;
  
  public abstract void setDataHandler(DataHandler paramDataHandler)
    throws MessagingException;
  
  public abstract void setDescription(String paramString)
    throws MessagingException;
  
  public abstract void setDisposition(String paramString)
    throws MessagingException;
  
  public abstract void setFileName(String paramString)
    throws MessagingException;
  
  public abstract void setHeader(String paramString1, String paramString2)
    throws MessagingException;
  
  public abstract void setText(String paramString)
    throws MessagingException;
  
  public abstract void writeTo(OutputStream paramOutputStream)
    throws IOException, MessagingException;
}

/* Location:
 * Qualified Name:     javax.mail.Part
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public final class PasswordAuthentication
{
  private final String user;
  private final String password;
  
  public PasswordAuthentication(String user, String password)
  {
    this.user = user;
    this.password = password;
  }
  
  public String getUserName()
  {
    return user;
  }
  
  public String getPassword()
  {
    return password;
  }
}

/* Location:
 * Qualified Name:     javax.mail.PasswordAuthentication
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class Provider$Type
{
  public static final Type STORE = new Type();
  public static final Type TRANSPORT = new Type();
}

/* Location:
 * Qualified Name:     javax.mail.Provider.Type
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class Provider
{
  private final String className;
  private final String protocol;
  private final Type type;
  private final String vendor;
  private final String version;
  
  public static class Type
  {
    public static final Type STORE = new Type();
    public static final Type TRANSPORT = new Type();
  }
  
  public Provider(Type type, String protocol, String className, String vendor, String version)
  {
    this.protocol = protocol;
    this.className = className;
    this.type = type;
    this.vendor = vendor;
    this.version = version;
  }
  
  public String getClassName()
  {
    return className;
  }
  
  public String getProtocol()
  {
    return protocol;
  }
  
  public Type getType()
  {
    return type;
  }
  
  public String getVendor()
  {
    return vendor;
  }
  
  public String getVersion()
  {
    return version;
  }
  
  public String toString()
  {
    return "protocol=" + protocol + "; type=" + type + "; class=" + className + (vendor == null ? "" : new StringBuffer().append("; vendor=").append(vendor).toString()) + (version == null ? "" : new StringBuffer().append(";version=").append(version).toString());
  }
}

/* Location:
 * Qualified Name:     javax.mail.Provider
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class Quota$Resource
{
  public String name;
  public long usage;
  public long limit;
  
  public Quota$Resource(String name, long usage, long limit)
  {
    this.name = name;
    this.usage = usage;
    this.limit = limit;
  }
}

/* Location:
 * Qualified Name:     javax.mail.Quota.Resource
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class Quota
{
  public String quotaRoot;
  public Resource[] resources;
  
  public Quota(String quotaRoot)
  {
    this.quotaRoot = quotaRoot;
  }
  
  public void setResourceLimit(String name, long limit)
  {
    Resource target = findResource(name);
    limit = limit;
  }
  
  private Resource findResource(String name)
  {
    if (resources == null)
    {
      Resource target = new Resource(name, 0L, 0L);
      resources = new Resource[] { target };
      return target;
    }
    for (int i = 0; i < resources.length; i++)
    {
      Resource current = resources[i];
      if (name.equalsIgnoreCase(name)) {
        return current;
      }
    }
    Resource[] newResources = new Resource[resources.length + 1];
    System.arraycopy(resources, 0, newResources, 0, resources.length);
    Resource target = new Resource(name, 0L, 0L);
    newResources[resources.length] = target;
    resources = newResources;
    return target;
  }
  
  public static class Resource
  {
    public String name;
    public long usage;
    public long limit;
    
    public Resource(String name, long usage, long limit)
    {
      this.name = name;
      this.usage = usage;
      this.limit = limit;
    }
  }
}

/* Location:
 * Qualified Name:     javax.mail.Quota
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public abstract interface QuotaAwareStore
{
  public abstract Quota[] getQuota(String paramString)
    throws MessagingException;
  
  public abstract void setQuota(Quota paramQuota)
    throws MessagingException;
}

/* Location:
 * Qualified Name:     javax.mail.QuotaAwareStore
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class ReadOnlyFolderException
  extends MessagingException
{
  private transient Folder _folder;
  
  public ReadOnlyFolderException(Folder folder)
  {
    this(folder, "Folder not found: " + folder.getName());
  }
  
  public ReadOnlyFolderException(Folder folder, String message)
  {
    super(message);
    _folder = folder;
  }
  
  public Folder getFolder()
  {
    return _folder;
  }
}

/* Location:
 * Qualified Name:     javax.mail.ReadOnlyFolderException
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

public class SendFailedException
  extends MessagingException
{
  protected transient Address[] invalid;
  protected transient Address[] validSent;
  protected transient Address[] validUnsent;
  
  public SendFailedException() {}
  
  public SendFailedException(String message)
  {
    super(message);
  }
  
  public SendFailedException(String message, Exception cause)
  {
    super(message, cause);
  }
  
  public SendFailedException(String message, Exception cause, Address[] validSent, Address[] validUnsent, Address[] invalid)
  {
    this(message, cause);
    this.invalid = invalid;
    this.validSent = validSent;
    this.validUnsent = validUnsent;
  }
  
  public Address[] getValidSentAddresses()
  {
    return validSent;
  }
  
  public Address[] getValidUnsentAddresses()
  {
    return validUnsent;
  }
  
  public Address[] getInvalidAddresses()
  {
    return invalid;
  }
}

/* Location:
 * Qualified Name:     javax.mail.SendFailedException
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package javax.mail;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Vector;
import javax.mail.event.ConnectionEvent;
import javax.mail.event.ConnectionListener;
import javax.mail.event.MailEvent;

public abstract class Service
{
  protected Session session;
  protected URLName url;
  protected boolean debug;
  private boolean connected;
  private final Vector connectionListeners = new Vector(2);
  private final EventQueue queue = new EventQueue();
  
  protected Service(Session session, URLName url)
  {
    this.session = session;
    this.url = url;
    debug = session.getDebug();
  }
  
  public void connect()
    throws MessagingException
  {
    connect(null, null, null);
  }
  
  public void connect(String host, String user, Str
1 2 3 4 5 6 7 8 9 10 11 12 13 14

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd