From 3bf05b5648732e6ea4ce4e63845e3fa075e017dc Mon Sep 17 00:00:00 2001 From: suter Date: Tue, 11 Jun 2013 10:45:42 +0200 Subject: [PATCH] get rid of mode for open in Java bindings too --- src/bindings/java/org/simgrid/msg/File.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/bindings/java/org/simgrid/msg/File.java b/src/bindings/java/org/simgrid/msg/File.java index 032a6bbce2..426ea071b6 100644 --- a/src/bindings/java/org/simgrid/msg/File.java +++ b/src/bindings/java/org/simgrid/msg/File.java @@ -18,24 +18,22 @@ public class File { private long bind = 0; /** * Constructor, opens the file. - * @param storage is the name where you can find the stream + * @param storage is the name where you can find the file descriptor * @param path is the file location on the storage - * @param mode points to a string beginning with one of the following sequences (Additional characters may follow these sequences.): r Open text file for reading. The stream is positioned at the beginning of the file. r+ Open for reading and writing. The stream is positioned at the beginning of the file. w Truncate file to zero length or create text file for writing. The stream is positioned at the beginning of the file. w+ Open for reading and writing. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file. a Open for appending (writing at end of file). The file is created if it does not exist. The stream is positioned at the end of the file. a+ Open for reading and appending (writing at end of file). The file is created if it does not exist. The initial file position for reading is at the beginning of the file, but output is always appended to the end of the file. */ - public File(String storage, String path, String mode) { + public File(String storage, String path) { this.storage = storage; - open(storage, path, mode); + open(storage, path); } protected void finalize() { } /** * Opens the file whose name is the string pointed to by path. - * @param storage is the name where you can find the stream + * @param storage is the name where you can find the file descriptor * @param path is the file location on the storage - * @param mode points to a string beginning with one of the following sequences (Additional characters may follow these sequences.): r Open text file for reading. The stream is positioned at the beginning of the file. r+ Open for reading and writing. The stream is positioned at the beginning of the file. w Truncate file to zero length or create text file for writing. The stream is positioned at the beginning of the file. w+ Open for reading and writing. The file is created if it does not exist, otherwise it is truncated. The stream is positioned at the beginning of the file. a Open for appending (writing at end of file). The file is created if it does not exist. The stream is positioned at the end of the file. a+ Open for reading and appending (writing at end of file). The file is created if it does not exist. The initial file position for reading is at the beginning of the file, but output is always appended to the end of the file. */ - protected native void open(String storage, String path, String mode); + protected native void open(String storage, String path); /** * Read elements of a file. * @param size of each element -- 2.20.1