Package com.lariflix.jemm.utils
Class JellyfinUtilFunctions
java.lang.Object
com.lariflix.jemm.utils.JellyfinUtilFunctions
Utility class for Jellyfin related functions.
This class provides utility methods that can be used across the application.
- Since:
- 1.0
- Author:
- Cesar Bianchi
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for the JellyfinUtilFunctions class. -
Method Summary
Modifier and TypeMethodDescriptioneraseModel
(DefaultTableModel model) Erases all rows from the given DefaultTableModel.boolean
extractFileFromJar
(String originName, String destName) Extracts a resource-file from a JAR and saves it to a temporary dir location.Retrieves the local path for the JRXML files.Retrieves the resource path for the JRXML files.
-
Constructor Details
-
JellyfinUtilFunctions
public JellyfinUtilFunctions()Default constructor for the JellyfinUtilFunctions class. This constructor is used when creating a new instance of this class without setting any initial values.- Since:
- 1.0
-
-
Method Details
-
eraseModel
Erases all rows from the given DefaultTableModel. This method is used to clear a table model.- Parameters:
model
- The DefaultTableModel to be cleared.- Returns:
- The cleared DefaultTableModel.
- Since:
- 1.0
-
extractFileFromJar
Extracts a resource-file from a JAR and saves it to a temporary dir location.- Parameters:
originName
- The name of the file to be extracted from the JAR file. This should include the path to the file inside the JAR file.destName
- The name of the file to be saved. This should include the path to the location where the file should be saved.- Returns:
- A boolean value indicating whether the file was successfully extracted and saved. Returns true if the operation was successful, and false otherwise.
- Throws:
IOException
- If there is an error reading the file from the JAR file or writing the file to the specified location.- Since:
- 1.1
-
getJRXMLLocalPath
Retrieves the local path for the JRXML files. This method returns a hardcoded string representing the local path for the JRXML files. This path is used for debugging purposes.- Returns:
- A string representing the local path for the JRXML files.
- Since:
- 1.1
-
getJRXMLResourcePath
Retrieves the resource path for the JRXML files. This method returns a hardcoded string representing the resource path for the JRXML files. This path is used to locate the JRXML files within the application's resources.- Returns:
- A string representing the resource path for the JRXML files.
- Since:
- 1.1
-