Java
Java
Replace Deprecated GetExpirationDt
Shows how to replace the deprecated GetExpirationDt method.Chilkat Java Downloads
import com.chilkatsoft.*;
public class ChilkatExample {
static {
try {
System.loadLibrary("chilkat");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load.\n" + e);
System.exit(1);
}
}
public static void main(String argv[])
{
CkCache cache = new CkCache();
// ....
// ....
String cache_item_key = "xyz";
// Instead of this:
CkDateTime dt1 = cache.GetExpirationDt(cache_item_key);
// Do this:
CkDateTime dt2 = new CkDateTime();
dt2.SetFromRfc822(cache.getExpirationStr(cache_item_key));
}
}