File
Date: 2013-11-17

org.simgrid.msg

## Class File

- java.lang.Object
- - org.simgrid.msg.File

-     public class File
      extends java.lang.Object

  Copyright (c) 2012-2013. The SimGrid Team. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the license (GNU LGPL) which comes with this package.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `storage`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `File(java.lang.String storage, java.lang.String path)` Constructor, opens the file.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close the file.
    `protected void` | `finalize()`
    `static void` | `nativeInit()` Class initializer, to initialize various JNI stuff
    `protected void` | `open(java.lang.String storage, java.lang.String path)` Opens the file whose name is the string pointed to by path.
    `long` | `read(long size, long nMemb)` Read elements of a file.
    `long` | `write(long size, long nMemb)` Write elements into a file.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### storage

          protected java.lang.String storage

  - ### Constructor Detail

    - #### File

          public File(java.lang.String storage,
              java.lang.String path)

      Constructor, opens the file.
      Parameters:
        `storage` - is the name where you can find the file descriptor
        `path` - is the file location on the storage

  - ### Method Detail

    - #### finalize

          protected void finalize()

      Overrides:
        `finalize` in class `java.lang.Object`

    - #### open

          protected void open(java.lang.String storage,
                  java.lang.String path)

      Opens the file whose name is the string pointed to by path.
      Parameters:
        `storage` - is the name where you can find the file descriptor
        `path` - is the file location on the storage

    - #### read

          public long read(long size,
                  long nMemb)

      Read elements of a file.
      Parameters:
        `size` - of each element
        `nMemb` - is the number of elements of data to write

    - #### write

          public long write(long size,
                   long nMemb)

      Write elements into a file.
      Parameters:
        `size` - of each element
        `nMemb` - is the number of elements of data to write

    - #### close

          public void close()

      Close the file.

    - #### nativeInit

          public static void nativeInit()

      Class initializer, to initialize various JNI stuff