Java
Chilkat2 Java
Example: Http.GetCacheRoot method
Demonstrates theGetCacheRoot method.
Chilkat Java Downloads
import com.chilkatsoft.chilkat2.Http;
public class ChilkatExample {
public static void main(String[] args) {
Http http = new Http();
// Establish 2 cache root directories.
http.addCacheRoot("c:/example/httpCacheA/");
http.addCacheRoot("c:/example/httpCacheB/");
System.out.println("Number of cache roots: " + http.getNumCacheRoots());
System.out.println("1st cache root: " + http.getCacheRoot(0));
System.out.println("2nd cache root: " + http.getCacheRoot(1));
// Output:
// Number of cache roots: 2
// 1st cache root: c:/example/httpCacheA/
// 2nd cache root: c:/example/httpCacheB/
}
}