NS3-GUI-HELPER V1.2.0
A code generator for NS-3 Scripts
Loading...
Searching...
No Matches
FileHandler.FileReaderWriter Class Reference

Static Public Member Functions

static void writeUsingPath (String data, String path)
 
static void writeUsingURL (String data, URL url)
 
static String readUsingPath (String path)
 
static String readIfEmptyUsingPath (String data, String path)
 

Detailed Description

to manage file handling operations

Definition at line 21 of file FileReaderWriter.java.

Member Function Documentation

◆ readIfEmptyUsingPath()

static String FileHandler.FileReaderWriter.readIfEmptyUsingPath ( String data,
String path )
static

to read the file, only if the file is not empty and writing into file if it's empty

Parameters
datathe default data that will be written if file is empty
pathpath of the file
Returns
The string that contains the data that is being read from the file if the file is empty, if not, it will return empty JSON object
Since
1.0.0

Definition at line 96 of file FileReaderWriter.java.

◆ readUsingPath()

static String FileHandler.FileReaderWriter.readUsingPath ( String path)
static

to read the file using the path of the file

Parameters
paththe path of the file
Returns
The data that is being read from the file
Since
1.0.0

Definition at line 73 of file FileReaderWriter.java.

◆ writeUsingPath()

static void FileHandler.FileReaderWriter.writeUsingPath ( String data,
String path )
static

to write in file using the path of the file in string format

Parameters
datathe data that needs to be written
paththe path of the file
Since
1.0.0

Definition at line 31 of file FileReaderWriter.java.

◆ writeUsingURL()

static void FileHandler.FileReaderWriter.writeUsingURL ( String data,
URL url )
static

to write in the file using the URL of the file

Parameters
datathe data that needs to be written
urlthe URL of the file
Since
1.0.0

Definition at line 52 of file FileReaderWriter.java.


The documentation for this class was generated from the following file: