1 /* Copyright (c) 2012-2014. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 package org.simgrid.msg;
11 * Represents the bind between the java comm and the
12 * native C comm. You must never access it, since it is
15 private long bind = 0;
17 * Constructor, opens the file.
18 * @param path is the file location on the storage
20 public File(String path) {
23 protected void finalize() {
27 * Opens the file whose name is the string pointed to by path.
28 * @param path is the file location on the storage
30 protected native void open(String path);
32 * Read elements of a file.
33 * @param size of each element
34 * @param nMemb is the number of elements of data to write
36 public native long read(long size, long nMemb);
38 * Write elements into a file.
39 * @param size of each element
40 * @param nMemb is the number of elements of data to write
42 public native long write(long size, long nMemb);
46 public native void close();
49 * Class initializer, to initialize various JNI stuff
51 public static native void nativeInit();