/**
 * @(#)SWFActionTag.java
 * @author  Intelligent Technology Inc.
 * @version 1.00 2002/4
 */
package	jp.co.iti.swf;

import	java.io.*;

/**
 * SWF ACTION TAG(ID=12)を表す。
 */
public class SWFActionTag extends SWFTag implements hasSWFActionRecord{
	private	SWFActionRecords	myRecords;
	
	public	SWFActionTag(int id ,byte[] data) throws SWFActionTagException ,SWFActionRecordException ,SWFActionRecordsException{
		super(id ,data);
		myRecords = new SWFActionRecords();
		
		// アクションレコード
		
		SWFInputStream swfstream = new SWFInputStream(new ByteArrayInputStream(data));
		try{
			try{
				myRecords.readRecords(swfstream);
			}finally{ swfstream.close(); }
		}catch(IOException e){ throw new SWFActionTagException(); }
	}
	
	public	SWFActionRecord[]	getActionRecords(){ return myRecords.getActionRecords(); }
}
