ResourceWriter Class
ResourceWriter Class
This Package | All Packages
public final class ResourceWriter
implements IResourceWriter
The ResourceWriter is responsible for persisting resource data to disk. This can either be done by persisting out data from an existing ResourceManager or creating a new ResourceWriter and using the setXXX methods.
Constructors
Methods
Name |
Description |
persistProperties()
|
Forces all properties to be written to disk. |
setBoolean(Locale locale, String name, boolean value)
|
Sets the root directory and baseName for the files. |
setByte(Locale locale, String name, byte value)
|
Sets the root directory and baseName for the files. |
setChar(Locale locale, String name, char value)
|
Sets the root directory and baseName for the files. |
setDouble(Locale locale, String name, double value)
|
Sets the root directory and baseName for the files. |
setFileLocation(String rootDirectory,
String baseName)
|
Sets the root directory and baseName for the files. |
setFloat(Locale locale, String name, float value)
|
Sets the root directory and baseName for the files. |
setInt(Locale locale, String name, int value)
|
Sets the root directory and baseName for the files. |
setLong(Locale locale, String name, long value)
|
Sets the root directory and baseName for the files. |
setObject(Locale locale, String name, Object value)
|
Sets the root directory and baseName for the files. |
setShort(Locale locale, String name, short value)
|
Sets the root directory and baseName for the files. |
setString(Locale locale, String name, String value)
|
Sets the root directory and baseName for the files. |
Constructors
public ResourceWriter();
Description
Creates a ResourceWriter.
public ResourceWriter( ResourceManager manager );
Parameters
- manager
- The ResourceManager to get data from.
Description
Creates a ResourceWriter. The created writer gets data from the specified ResourceManager.
Methods
Syntax
public void persistProperties();
Description
Forces all properties to be written to disk.
Syntax
public void setBoolean( Locale locale, String name, boolean value );
Parameters
- rootDirectory
- he directory to create resource files in.
- baseName
- Base file name. The locale information and resource extension will be postpended onto this name.
Description
Sets the root directory and baseName for the files.
Syntax
public void setByte( Locale locale, String name, byte value );
Parameters
- rootDirectory
- The directory to create resource files in.
- baseName
- Base file name. The locale information and resource extension will be postpended onto this name.
Description
Sets the root directory and baseName for the files.
Syntax
public void setChar( Locale locale, String name, char value );
Parameters
- rootDirectory
- he directory to create resource files in.
- baseName
- Base file name. The locale information and resource extension will be postpended onto this name.
Description
Sets the root directory and baseName for the files.
Syntax
public void setDouble( Locale locale, String name, double value );
Parameters
- rootDirectory
- The directory to create resource files in.
- baseName
- Base file name. The locale information and resource extension will be postpended onto this name.
Description
Sets the root directory and baseName for the files.
Syntax
public void setFileLocation( String rootDirectory, String baseName );
Parameters
- rootDirectory
- The directory to create resource files in.
- baseName
- Base file name. The locale information and resource extension will be postpended onto this name.
Description
Sets the root directory and baseName for the files.
Syntax
public void setFloat( Locale locale, String name, float value );
Parameters
- rootDirectory
- The directory to create resource files in.
- baseName
- Base file name. The locale information and resource extension will be postpended onto this name.
Description
Sets the root directory and baseName for the files.
Syntax
public void setInt( Locale locale, String name, int value );
Parameters
- rootDirectory
- The directory to create resource files in.
- baseName
- Base file name. The locale information and resource extension will be postpended onto this name.
Description
Sets the root directory and baseName for the files.
Syntax
public void setLong( Locale locale, String name, long value );
Parameters
- rootDirectory
- The directory to create resource files in.
- baseName
- Base file name. The locale information and resource extension will be postpended onto this name.
Description
Sets the root directory and baseName for the files.
Syntax
public void setObject( Locale locale, String name, Object value );
Parameters
- rootDirectory
- The directory to create resource files in.
- baseName
- Base file name. The locale information and resource extension will be postpended onto this name.
Description
Sets the root directory and baseName for the files.
Syntax
public void setShort( Locale locale, String name, short value );
Parameters
- rootDirectory
- The directory to create resource files in.
- baseName
- Base file name. The locale information and resource extension will be postpended onto this name.
Description
Sets the root directory and baseName for the files.
Syntax
public void setString( Locale locale, String name, String value );
Parameters
- rootDirectory
- The directory to create resource files in.
- baseName
- Base file name. The locale information and resource extension will be postpended onto this name.
Description
Sets the root directory and baseName for the files.