legacy.resource
Class Format

java.lang.Object
  extended by legacy.resource.Format
Direct Known Subclasses:
NativeFontFormat, NativeImageFormat, NativeMidiFormat, NativePalletFormat, NativeSoundFormat

public abstract class Format
extends java.lang.Object

Format.class

Author:
Benjamin Tarrant

Constructor Summary
Format(java.io.InputStream stream)
          Format is requred to be able to be read directly from an InputStream
 
Method Summary
protected static java.lang.Object getFormatLoadLock()
          getFormatLoadLock() is used to prevent race conditions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Format

public Format(java.io.InputStream stream)
       throws java.io.IOException
Format is requred to be able to be read directly from an InputStream

Parameters:
stream -
Throws:
java.io.IOException
Method Detail

getFormatLoadLock

protected static final java.lang.Object getFormatLoadLock()
getFormatLoadLock() is used to prevent race conditions.
Warning no method other than a Format constructor or ResourceManager may call this class. The correct and only possible usage is as follows.
 class myGame extends Format{
     public NativeImageFormat(InputStream stream){
         super(stream);
         synchronized(this.getFormatLoadLock()){
     }
 }
 

Returns:
format lock object