本文整理了Java中javax.mail.Store.toString()
方法的一些代码示例,展示了Store.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Store.toString()
方法的具体详情如下:
包路径:javax.mail.Store
类名称:Store
方法名:toString
暂无
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Return the fully qualified name of the folder, for use in log messages.
* Essentially just the getURLName method, but ignoring the
* MessagingException that can never happen.
*/
private static String folderName(Folder folder) {
try {
return folder.getURLName().toString();
} catch (MessagingException mex) {
// can't happen
return folder.getStore().toString() + "/" + folder.toString();
}
}
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Return the fully qualified name of the folder, for use in log messages.
* Essentially just the getURLName method, but ignoring the
* MessagingException that can never happen.
*/
private static String folderName(Folder folder) {
try {
return folder.getURLName().toString();
} catch (MessagingException mex) {
// can't happen
return folder.getStore().toString() + "/" + folder.toString();
}
}
}
代码示例来源:origin: stackoverflow.com
store = session.getStore("imaps");
store.connect(mailhost, user, password);
Log.i(TAG, "Store: "+store.toString());
} catch (NoSuchProviderException e) {
代码示例来源:origin: org.glassfish.metro/webservices-extra
/**
* Return the fully qualified name of the folder, for use in log messages.
* Essentially just the getURLName method, but ignoring the
* MessagingException that can never happen.
*/
private static String folderName(Folder folder) {
try {
return folder.getURLName().toString();
} catch (MessagingException mex) {
// can't happen
return folder.getStore().toString() + "/" + folder.toString();
}
}
}
代码示例来源:origin: com.sun.mail/jakarta.mail
/**
* Return the fully qualified name of the folder, for use in log messages.
* Essentially just the getURLName method, but ignoring the
* MessagingException that can never happen.
*/
private static String folderName(Folder folder) {
try {
return folder.getURLName().toString();
} catch (MessagingException mex) {
// can't happen
return folder.getStore().toString() + "/" + folder.toString();
}
}
}
代码示例来源:origin: com.sun.mail/android-mail
/**
* Return the fully qualified name of the folder, for use in log messages.
* Essentially just the getURLName method, but ignoring the
* MessagingException that can never happen.
*/
private static String folderName(Folder folder) {
try {
return folder.getURLName().toString();
} catch (MessagingException mex) {
// can't happen
return folder.getStore().toString() + "/" + folder.toString();
}
}
}
代码示例来源:origin: com.axway.ats.framework/ats-actionlibrary
/**
* Close connection
* <b>Note</b>Internal method
* @throws MessagingException
*/
public void closeStoreConnection(
boolean storeConnected ) throws MessagingException {
if (storeConnected) {
// the folder is empty when the message is not loaded from IMAP server, but from a file
Folder imapFolder = message.getFolder();
if (imapFolder == null) {
imapFolder = partOfImapFolder; // in case of nested package but still originating from IMAP server
}
if (imapFolder != null) {
Store store = imapFolder.getStore();
if (store != null && store.isConnected()) {
// closing store closes and its folders
log.debug("Closing store (" + store.toString() + ") and associated folders");
store.close();
}
}
}
}
代码示例来源:origin: jboss/jboss-javaee-specs
/**
* Return the fully qualified name of the folder, for use in log messages.
* Essentially just the getURLName method, but ignoring the
* MessagingException that can never happen.
*/
private static String folderName(Folder folder) {
try {
return folder.getURLName().toString();
} catch (MessagingException mex) {
// can't happen
return folder.getStore().toString() + "/" + folder.toString();
}
}
}
代码示例来源:origin: org.ow2.petals/petals-bc-mail
this.log.log(Level.WARNING, "Error closing mail Store : " + store.toString(), ex);
代码示例来源:origin: org.ow2.petals/petals-bc-mail
/**
* Retrieve a specified {@link Folder} from the given {@link Store} and open it.
*
* @param store
* the mail {@link Store}
* @param consumeDescriptor
* the mail {@link ConsumeDescriptor}
* @return the opened {@link Folder}
* @throws MessagingException
*/
public Folder getFolderAndOpen(Store store, ConsumeDescriptor consumeDescriptor) throws MessagingException {
String msg = "";
// Search in the specified folder of this Store
Folder folder = null;
folder = store.getDefaultFolder();
if (folder == null) {
msg = "No default folder for this store : " + store.toString();
throw new MessagingException(msg);
}
folder = folder.getFolder(consumeDescriptor.getFolder());
if (folder == null) {
msg = "Invalid folder : " + consumeDescriptor.getFolder();
throw new MessagingException(msg);
}
folder.open(Folder.READ_WRITE);
return folder;
}
内容来源于网络,如有侵权,请联系作者删除!