ppt4j 1.0
 
Loading...
Searching...
No Matches
ppt4j.util.FileUtils Class Reference

Static Public Member Functions

static void makeLocalDirectory (String path)
 
static< T > void serializeObject (T object, String path)
 
static< T > T deserializeObject (Class< T > clazz, String path)
 
static< T > T deserializeObject (Class< T > clazz, InputStream is)
 

Member Function Documentation

◆ deserializeObject() [1/2]

static< T > T ppt4j.util.FileUtils.deserializeObject ( Class< T > clazz,
InputStream is )
static

Deserializes an object of the specified class from the provided input stream using a ProxyOIS object.

Parameters
clazzthe class of the object to be deserialized
isthe input stream containing the serialized object
Returns
the deserialized object of the specified class
Exceptions
IllegalStateExceptionif an IOException or ClassNotFoundException occurs during deserialization

◆ deserializeObject() [2/2]

static< T > T ppt4j.util.FileUtils.deserializeObject ( Class< T > clazz,
String path )
static

Deserializes an object of the specified class type from the given file path.

Parameters
<T>the type of the object being deserialized
clazzthe class type of the object being deserialized
paththe file path from which the object will be deserialized
Returns
the deserialized object of the specified class type
Exceptions
IllegalStateExceptionif an error occurs during deserialization

◆ makeLocalDirectory()

static void ppt4j.util.FileUtils.makeLocalDirectory ( String path)
static

Creates a local directory at the specified path if it does not already exist. If a file exists with the same name as the directory, an error is logged and an IllegalStateException is thrown. If the directory creation fails, an error is logged and an IllegalStateException is thrown.

Parameters
paththe path where the directory should be created

◆ serializeObject()

static< T > void ppt4j.util.FileUtils.serializeObject ( T object,
String path )
static

Serializes an object to a specified file path using ObjectOutputStream.

Parameters
objectthe object to serialize
paththe file path to save the serialized object
<T>the type of the object being serialized

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