org.gamenet.application.mm8leveleditor.converter
Class FormatConverter

java.lang.Object
  extended byorg.gamenet.application.mm8leveleditor.converter.FormatConverter
Direct Known Subclasses:
MultipleTGAToBMPFormatConverter, NullFormatConverter, StrToTextFormatConverter, TGAToBMPFormatConverter

public abstract class FormatConverter
extends Object

Author:
mlk Default implementation does nothing

Nested Class Summary
 class FormatConverter.UnsupportedFileFormatException
           
 
Field Summary
protected  InputStream sourceInputStream
           
protected  OutputStream sourceOutputStream
           
 
Constructor Summary
FormatConverter()
           
 
Method Summary
 InputStream getDestinationInputStreamForOldFormat()
          Set input Stream from which the original format can be read
 int getRequiredStreamCount()
           
 OutputStream getSourceOutputStreamForOldFormat()
          Set output Stream where the original format will be written
 String[] getSuggestedFilenames(String baseFilename)
           
 boolean isFileNameComponentForLodEntryFileName(String fileName, String LodEntryFileName)
           
 boolean requiresMultipleStreams()
           
abstract  void setDestinationOutputStreamForNewFormat(OutputStream stream, LodResource lodResource)
          Set output Stream where the new converted format will be written
 void setDestinationOutputStreamsForNewFormat(OutputStream[] outputStreamArray, LodResource lodResource)
           
abstract  void setSourceInputStreamForNewFormat(InputStream stream, LodResource lodResource)
          Set input stream from which the new converted format will be read
 void setSourceInputStreamsForNewFormat(InputStream[] inputStreamArray, LodResource lodResource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sourceOutputStream

protected OutputStream sourceOutputStream

sourceInputStream

protected InputStream sourceInputStream
Constructor Detail

FormatConverter

public FormatConverter()
Method Detail

isFileNameComponentForLodEntryFileName

public boolean isFileNameComponentForLodEntryFileName(String fileName,
                                                      String LodEntryFileName)

requiresMultipleStreams

public boolean requiresMultipleStreams()

getRequiredStreamCount

public int getRequiredStreamCount()

getSuggestedFilenames

public String[] getSuggestedFilenames(String baseFilename)

setDestinationOutputStreamsForNewFormat

public void setDestinationOutputStreamsForNewFormat(OutputStream[] outputStreamArray,
                                                    LodResource lodResource)
                                             throws IOException
Throws:
IOException

setDestinationOutputStreamForNewFormat

public abstract void setDestinationOutputStreamForNewFormat(OutputStream stream,
                                                            LodResource lodResource)
                                                     throws IOException
Set output Stream where the new converted format will be written

Parameters:
stream - where the new converted format will be written
Throws:
IOException

getSourceOutputStreamForOldFormat

public OutputStream getSourceOutputStreamForOldFormat()
Set output Stream where the original format will be written


setSourceInputStreamsForNewFormat

public void setSourceInputStreamsForNewFormat(InputStream[] inputStreamArray,
                                              LodResource lodResource)
                                       throws IOException
Throws:
IOException

setSourceInputStreamForNewFormat

public abstract void setSourceInputStreamForNewFormat(InputStream stream,
                                                      LodResource lodResource)
                                               throws IOException
Set input stream from which the new converted format will be read

Parameters:
stream - from which the new converted format will be read
Throws:
IOException

getDestinationInputStreamForOldFormat

public InputStream getDestinationInputStreamForOldFormat()
Set input Stream from which the original format can be read