| 1 |
|
| 2 |
package org.freehep.graphicsio.cgm; |
| 3 |
|
| 4 |
import java.io.IOException; |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
public class Escape extends CGMTag { |
| 14 |
|
| 15 |
private int id; |
| 16 |
|
| 17 |
private byte[] data; |
| 18 |
|
| 19 |
public Escape() { |
| 20 |
super(6, 1, 1); |
| 21 |
} |
| 22 |
|
| 23 |
public Escape(int id, byte[] data) { |
| 24 |
this(); |
| 25 |
this.id = id; |
| 26 |
this.data = data; |
| 27 |
} |
| 28 |
|
| 29 |
public void write(int tagID, CGMOutputStream cgm) throws IOException { |
| 30 |
cgm.writeInteger(id); |
| 31 |
cgm.writeData(data); |
| 32 |
} |
| 33 |
|
| 34 |
public void write(int tagID, CGMWriter cgm) throws IOException { |
| 35 |
cgm.print("ESCAPE "); |
| 36 |
cgm.writeInteger(id); |
| 37 |
cgm.println(); |
| 38 |
cgm.writeData(data); |
| 39 |
} |
| 40 |
} |