megamek.common.loaders
Class HmpFile

java.lang.Object
  extended by megamek.common.loaders.HmpFile
All Implemented Interfaces:
IMechLoader

public class HmpFile
extends java.lang.Object
implements IMechLoader

Based on the hmpread.c program and the MtfFile object. Note that this class doubles as both a MM Heavy Metal Pro parser and a HMP to MTF file converter (when the "main" method is used).

Version:
$Revision: 7632 $ Modified by Ryan McConnell (oscarmm) with lots of help from Ian Hamilton.
Author:
Michael Newcomb

Constructor Summary
HmpFile(java.io.InputStream is)
           
 
Method Summary
 Entity getEntity()
          Return a valid mech, matching the file to the best of MegaMek's current capabilities, or throw an exception with a helpful message.
 java.lang.String getMtf()
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HmpFile

public HmpFile(java.io.InputStream is)
        throws EntityLoadingException
Throws:
EntityLoadingException
Method Detail

getEntity

public Entity getEntity()
                 throws EntityLoadingException
Description copied from interface: IMechLoader
Return a valid mech, matching the file to the best of MegaMek's current capabilities, or throw an exception with a helpful message.

Specified by:
getEntity in interface IMechLoader
Throws:
EntityLoadingException

getMtf

public java.lang.String getMtf()

main

public static void main(java.lang.String[] args)