| 1 | // Copyright 2001, FreeHEP. |
| 2 | package org.freehep.graphicsio.cgm; |
| 3 | |
| 4 | import java.io.IOException; |
| 5 | |
| 6 | /** |
| 7 | * NoOp TAG. |
| 8 | * |
| 9 | * @author Mark Donszelmann |
| 10 | * @author Charles Loomis |
| 11 | * @version $Id: freehep-graphicsio-cgm/src/main/java/org/freehep/graphicsio/cgm/NoOp.java 278fac7cefaa 2005/12/05 04:00:43 duns $ |
| 12 | */ |
| 13 | public class NoOp extends CGMTag { |
| 14 | |
| 15 | private int n; |
| 16 | |
| 17 | public NoOp() { |
| 18 | super(0, 0, 1); |
| 19 | } |
| 20 | |
| 21 | public NoOp(int n) { |
| 22 | this(); |
| 23 | this.n = n; |
| 24 | } |
| 25 | |
| 26 | public void write(int tagID, CGMOutputStream cgm) throws IOException { |
| 27 | for (int i = 0; i < n; i++) { |
| 28 | cgm.writeUnsignedByte(0); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | public void write(int tagID, CGMWriter cgm) throws IOException { |
| 33 | } |
| 34 | } |