Java 类org.jivesoftware.smack.util.StringEncoder 实例源码

项目:androidPN-client.    文件:SimpleDirectoryPersistentCache.java   
/**
 * Creates a new SimpleDirectoryPersistentCache Object. Make sure that the
 * cacheDir exists and that it's an directory.
 * 
 * If your cacheDir is case insensitive then make sure to set the
 * StringEncoder to {@link Base32Encoder} (which is the default).
 * 
 * @param cacheDir The directory where the cache will be stored.
 * @param filenameEncoder Encodes the node string into a filename.
 */
public SimpleDirectoryPersistentCache(File cacheDir, StringEncoder filenameEncoder) {
    if (!cacheDir.exists())
        throw new IllegalStateException("Cache directory \"" + cacheDir + "\" does not exist");
    if (!cacheDir.isDirectory())
        throw new IllegalStateException("Cache directory \"" + cacheDir + "\" is not a directory");

    this.cacheDir = cacheDir;
    this.filenameEncoder = filenameEncoder;
}
项目:java-bells    文件:SimpleDirectoryPersistentCache.java   
/**
 * Creates a new SimpleDirectoryPersistentCache Object. Make sure that the
 * cacheDir exists and that it's an directory.
 * 
 * If your cacheDir is case insensitive then make sure to set the
 * StringEncoder to {@link Base32Encoder} (which is the default).
 * 
 * @param cacheDir The directory where the cache will be stored.
 * @param filenameEncoder Encodes the node string into a filename.
 */
public SimpleDirectoryPersistentCache(File cacheDir, StringEncoder filenameEncoder) {
    if (!cacheDir.exists())
        throw new IllegalStateException("Cache directory \"" + cacheDir + "\" does not exist");
    if (!cacheDir.isDirectory())
        throw new IllegalStateException("Cache directory \"" + cacheDir + "\" is not a directory");

    this.cacheDir = cacheDir;
    this.filenameEncoder = filenameEncoder;
}
项目:asmack-mini    文件:SimpleDirectoryPersistentCache.java   
/**
 * Creates a new SimpleDirectoryPersistentCache Object. Make sure that the
 * cacheDir exists and that it's an directory.
 * 
 * If your cacheDir is case insensitive then make sure to set the
 * StringEncoder to {@link Base32Encoder} (which is the default).
 * 
 * @param cacheDir The directory where the cache will be stored.
 * @param filenameEncoder Encodes the node string into a filename.
 */
public SimpleDirectoryPersistentCache(File cacheDir, StringEncoder filenameEncoder) {
    if (!cacheDir.exists())
        throw new IllegalStateException("Cache directory \"" + cacheDir + "\" does not exist");
    if (!cacheDir.isDirectory())
        throw new IllegalStateException("Cache directory \"" + cacheDir + "\" is not a directory");

    this.cacheDir = cacheDir;
    this.filenameEncoder = filenameEncoder;
}