MCPcopy Create free account
hub / github.com/OSGeo/gdal / main

Method main

swig/java/apps/GDALTestVSI.java:22–53  ·  view source on GitHub ↗

@param args

(String[] args)

Source from the content-addressed store, hash-verified

20 * @param args
21 */
22 public static void main(String[] args) {
23 gdal.AllRegister();
24 gdal.VSICurlClearCache();
25 gdal.VSICurlPartialClearCache("/cache/key");
26 if( gdal.GetConfigOption("foo") != null ) {
27 throw new RuntimeException("failed: gdal.GetConfigOption(\"foo\") != null");
28 }
29 gdal.SetConfigOption("foo", "bar");
30 if( !gdal.GetConfigOption("foo").equals("bar") ) {
31 throw new RuntimeException("failed: !gdal.GetConfigOption(\"foo\").equals(\"bar\")");
32 }
33 gdal.SetConfigOption("foo", null);
34 if( gdal.GetConfigOption("foo") != null ) {
35 throw new RuntimeException("failed: gdal.GetConfigOption(\"foo\") != null");
36 }
37 try {
38 gdal.SetConfigOption(null, null);
39 throw new RuntimeException("exception expected");
40 }
41 catch(java.lang.NullPointerException e) {
42 }
43 catch(java.lang.IllegalArgumentException e) {
44 }
45 try {
46 gdal.VSICurlPartialClearCache(null);
47 throw new RuntimeException("exception expected");
48 }
49 catch(java.lang.NullPointerException e) {
50 }
51 catch(java.lang.IllegalArgumentException e) {
52 }
53 }
54}

Callers

nothing calls this directly

Calls 3

AllRegisterMethod · 0.80
GetConfigOptionMethod · 0.80
SetConfigOptionMethod · 0.80

Tested by

no test coverage detected