|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jmex.model.converters.FormatConverter
public abstract class FormatConverter
Started Date: Jul 1, 2004
This class is a base for all format converters and provides a generic framework
to convert to jME format from any other format.
| Field Summary | |
|---|---|
(package private) java.util.HashMap<java.lang.String,java.lang.Object> |
properties
Contains a map of properties that tell the converter how to convert the format. |
| Constructor Summary | |
|---|---|
FormatConverter()
|
|
| Method Summary | |
|---|---|
void |
attemptFileConvert(java.lang.String[] args)
Given an array of string arguments representing two files, the first file will be read and the second file will be deleted (if existing), then created and written to. |
void |
clearProperty(java.lang.String key)
Removes a property. |
abstract void |
convert(java.io.InputStream format,
java.io.OutputStream jMEFormat)
Reads a given format and writes it to jMEFormat in the jME binary format. |
java.lang.Object |
getProperty(java.lang.String key)
Returns the value of a property. |
void |
setProperty(java.lang.String key,
java.lang.Object property)
Adds a property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
java.util.HashMap<java.lang.String,java.lang.Object> properties
| Constructor Detail |
|---|
public FormatConverter()
| Method Detail |
|---|
public abstract void convert(java.io.InputStream format,
java.io.OutputStream jMEFormat)
throws java.io.IOException
format and writes it to jMEFormat in the jME binary format.
format - InputStream representing the format to readjMEFormat - OutputStream to write the jME binary equivalent too
java.io.IOException - If anything goes wrong during the writtingpublic void attemptFileConvert(java.lang.String[] args)
args - The array representing the from file and to file
public void setProperty(java.lang.String key,
java.lang.Object property)
key - Key to add (For example "texdir")property - Property for that key to have (For example "c:\\blarg\\")public java.lang.Object getProperty(java.lang.String key)
key - Key of value to return (For example "texdir")setProperty(String, Object)public void clearProperty(java.lang.String key)
key - The property to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||