View Javadoc

1   // Copyright 2001, FreeHEP.
2   package org.freehep.graphicsio.swf;
3   
4   import java.io.IOException;
5   
6   /**
7    * JPEGTables TAG.
8    * 
9    * @author Mark Donszelmann
10   * @author Charles Loomis
11   * @version $Id: JPEGTables.java 8584 2006-08-10 23:06:37Z duns $
12   */
13  public class JPEGTables extends DefinitionTag {
14  
15      private byte[] table;
16  
17      public JPEGTables() {
18          super(8, 1);
19      }
20  
21      public SWFTag read(int tagID, SWFInputStream swf, int len)
22              throws IOException {
23  
24          JPEGTables tag = new JPEGTables();
25          tag.table = swf.readByte(len);
26          swf.setJPEGTable(tag.table);
27          return tag;
28      }
29  
30      public void write(int tagID, SWFOutputStream swf) throws IOException {
31          swf.writeByte(table);
32      }
33  
34      public String toString() {
35          return super.toString() + "\n" + "  length: " + table.length + "\n";
36      }
37  }