File: testcbf.java

package info (click to toggle)
cbflib 0.9.5.18%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 55,660 kB
  • sloc: ansic: 102,669; python: 4,552; sh: 3,032; makefile: 1,641; yacc: 659; f90: 210; xml: 210; cpp: 58; java: 16
file content (22 lines) | stat: -rw-r--r-- 674 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import org.iucr.cbflib.*;

// javac -cp cbflib-0.8.0.jar testcbf.java
// LD_LIBRARY_PATH=solib java -cp cbflib-0.8.0.jar:. testcbf
public class testcbf {

	static {
		System.loadLibrary("cbf_wrap");
	}

	public static void main(String[] args) {
		SWIGTYPE_p_FILE f = cbf.fopen("examples/template_pilatus6m_2463x2527.cbf", "rb");
		cbf_handle_struct chs = new cbf_handle_struct();
		int status = 0;
		status = cbf.cbf_read_widefile(chs, f, cbfConstants.MSG_DIGEST);
		System.out.println("read_widefile (" + status + ")");

		uintp mp = new uintp();
		status = cbf.cbf_count_datablocks(chs, mp.cast());
		System.out.println("count_dbs (" + status + ") = " + mp.value());
	}
}