public byte tmat(String fileName) throws IOException {
		
		initialize(fileName);
		FileOutputStream fos = null;
	    DataOutputStream dos = null;
	    try{
	    	// create file output stream
	    	fos = new FileOutputStream("tmat_bin");
	    	// create data output stream
	    	dos = new DataOutputStream(fos);
	    	String str = list.get(0).trim();
	    	String[] params = str.split("\\s");
	    	if(!(params[0].equals("tmat"))){
	    		System.out.println("Incorrect transition file given as argument");
	    		System.exit(0);
        }
        dos.writeFloat(Float.parseFloat(params[1]));
        dos.writeFloat(Float.parseFloat(params[2]));
        
		for (int i = 1; i < list.size(); i++) 
			{	
			if(!(i % 4 == 1))
			{
				String str1 = list.get(i).trim();
				String[] result = str1.split("\\s");
				for (int j = 0; j < 2; j++)
				dos.writeFloat(Float.parseFloat(result[j]));
			}
			
		}
	    }catch(Exception e){
	            // if any I/O error occurs
	            e.printStackTrace();
	            return 0;
	         }finally{ if(dos != null)
	             dos.close();
	         if(fos!=null)
	            fos.close();
	         }
	    return 1;
	    }