Examples of MailcapFile


Examples of com.sun.activation.registries.MailcapFile

    private final Object sync = new Object();

    public void addMailcapEntries(InputStream mailcapFile, Bundle originatingBundle) throws IOException {

        synchronized (sync) {
            db.put(originatingBundle, new MailcapFile(mailcapFile));
        }

        log.debug("Added mailcap entries from bundle {}", originatingBundle);
    }
View Full Code Here

Examples of com.sun.activation.registries.MailcapFile

     * The default Constructor.
     */
    public MailcapCommandMap() {
  super();
  List dbv = new ArrayList(5)// usually 5 or less databases
  MailcapFile mf = null;
  dbv.add(null);    // place holder for PROG entry

  LogSupport.log("MailcapCommandMap: load HOME");
  try {
      String user_home = System.getProperty("user.home");
View Full Code Here

Examples of com.sun.activation.registries.MailcapFile

    private MailcapFile loadResource(String name) {
  InputStream clis = null;
  try {
      clis = SecuritySupport.getResourceAsStream(this.getClass(), name);
      if (clis != null) {
    MailcapFile mf = new MailcapFile(clis);
    if (LogSupport.isLoggable())
        LogSupport.log("MailcapCommandMap: successfully loaded " +
      "mailcap file: " + name);
    return mf;
      } else {
View Full Code Here

Examples of com.sun.activation.registries.MailcapFile

        if (LogSupport.isLoggable())
      LogSupport.log("MailcapCommandMap: URL " + url);
        try {
      clis = SecuritySupport.openStream(url);
      if (clis != null) {
          v.add(new MailcapFile(clis));
          anyLoaded = true;
          if (LogSupport.isLoggable())
        LogSupport.log("MailcapCommandMap: " +
            "successfully loaded " +
            "mailcap file from URL: " +
            url);
      } else {
          if (LogSupport.isLoggable())
        LogSupport.log("MailcapCommandMap: " +
            "not loading mailcap " +
            "file from URL: " + url);
      }
        } catch (IOException ioex) {
      if (LogSupport.isLoggable())
          LogSupport.log("MailcapCommandMap: can't load " +
            url, ioex);
        } catch (SecurityException sex) {
      if (LogSupport.isLoggable())
          LogSupport.log("MailcapCommandMap: can't load " +
            url, sex);
        } finally {
      try {
          if (clis != null)
        clis.close();
      } catch (IOException cex) { }
        }
    }
      }
  } catch (Exception ex) {
      if (LogSupport.isLoggable())
    LogSupport.log("MailcapCommandMap: can't load " + name, ex);
  }

  // if failed to load anything, fall back to old technique, just in case
  if (!anyLoaded) {
      if (LogSupport.isLoggable())
    LogSupport.log("MailcapCommandMap: !anyLoaded");
      MailcapFile mf = loadResource("/" + name);
      if (mf != null)
    v.add(mf);
  }
    }
View Full Code Here

Examples of com.sun.activation.registries.MailcapFile

    /**
     * Load from the named file.
     */
    private MailcapFile loadFile(String name) {
  MailcapFile mtf = null;

  try {
      mtf = new MailcapFile(name);
  } catch (IOException e) {
      //  e.printStackTrace();
  }
  return mtf;
    }
View Full Code Here

Examples of com.sun.activation.registries.MailcapFile

  this();

  if (LogSupport.isLoggable())
      LogSupport.log("MailcapCommandMap: load PROG from " + fileName);
  if (DB[PROG] == null) {
      DB[PROG] = new MailcapFile(fileName);
  }
    }
View Full Code Here

Examples of com.sun.activation.registries.MailcapFile

  this();

  LogSupport.log("MailcapCommandMap: load PROG");
  if (DB[PROG] == null) {
      try {
    DB[PROG] = new MailcapFile(is);
      } catch (IOException ex) {
    // XXX - should throw it
      }
  }
    }
View Full Code Here

Examples of com.sun.activation.registries.MailcapFile

     */
    public synchronized void addMailcap(String mail_cap) {
  // check to see if one exists
  LogSupport.log("MailcapCommandMap: add to PROG");
  if (DB[PROG] == null)
      DB[PROG] = new MailcapFile();

  DB[PROG].appendToMailcap(mail_cap);
    }
View Full Code Here

Examples of com.sun.activation.registries.MailcapFile

     * The default Constructor.
     */
    public MailcapCommandMap() {
  super();
  List dbv = new ArrayList(5)// usually 5 or less databases
  MailcapFile mf = null;
  dbv.add(null);    // place holder for PROG entry

  LogSupport.log("MailcapCommandMap: load HOME");
  try {
      String user_home = System.getProperty("user.home");
View Full Code Here

Examples of com.sun.activation.registries.MailcapFile

    private MailcapFile loadResource(String name) {
  InputStream clis = null;
  try {
      clis = SecuritySupport.getResourceAsStream(this.getClass(), name);
      if (clis != null) {
    MailcapFile mf = new MailcapFile(clis);
    if (LogSupport.isLoggable())
        LogSupport.log("MailcapCommandMap: successfully loaded " +
      "mailcap file: " + name);
    return mf;
      } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.