Recently I packed all my data files together to save space in the Jar (and boy did it save a lot of space, like 30%!) and changed the Image creation routine to read in the image and then create the image from the bytes in memory.
This works but is slow as molasses on the 7210 - I'm talking like 5 seconds to create each image.
Am I doing anything wrong ? or can anyone suggest a better way of doing this ?
public Image CreateImage( int nResourceID )
int nLength, nOffset;
InputStream inputStream = getClass().getResourceAsStream( "/pak.dat" );
nLength = FileResource.FileInfo[ 2 * nResourceID ];
nOffset = FileResource.FileInfo[ (2 * nResourceID) + 1 ];
inputStream.skip( nOffset );
inputStream.read( fileReadBuffer, 0, nLength );
newImage = Image.createImage( fileReadBuffer, 0, nLength );
catch( Exception e )
System.err.println( "CreateImage went bad\n" );
System.err.println( e.toString() );
Thread.sleep( 5000 );