MaterialState matState=new MaterialState(){ private static final long serialVersionUID = 1L;  public void apply() {throw new JmeException("I am not to be used in a real graph");} };
MaterialState matState=DisplaySystem.getDisplaySystem().getRenderer().createMaterialState();
    private void readMats() throws IOException {        int nNumMaterials=inFile.readUnsignedShort();        for (int i=0;i<nNumMaterials;i++){            inFile.skipBytes(32);   // Skip the name, unused            MaterialState matState=new MaterialState(){                private static final long serialVersionUID = 1L;				public void apply() {throw new JmeException("I am not to be used in a real graph");}            };            matState.setAmbient(getNextColor());            matState.setDiffuse(getNextColor());            matState.setSpecular(getNextColor());            matState.setEmissive(getNextColor());            matState.setShininess(inFile.readFloat());            float alpha = inFile.readFloat();            matState.getDiffuse().a = alpha;            matState.getEmissive().a = alpha;            matState.getAmbient().a = alpha;                        inFile.readByte();      // Mode is ignored            inFile.readFully(tempChar,0,128);            TextureState texState=null;            String texFile=cutAtNull(tempChar);            if (texFile.length()!=0){                texState=DisplaySystem.getDisplaySystem().getRenderer().createTextureState();                Texture tempTex=new Texture();                tempTex.setImageLocation("file:/"+texFile);                tempTex.setWrap(Texture.WM_WRAP_S_WRAP_T);                texState.setTexture(tempTex);            }            inFile.readFully(tempChar,0,128);   // Alpha map, but it is ignored            //TODO: Implement Alpha Maps            applyStates(matState,texState,i);        }    }