1 |
|
2 |
package org.freehep.graphicsio.emf.gdiplus; |
3 |
|
4 |
import java.io.IOException; |
5 |
|
6 |
import org.freehep.graphicsio.emf.EMFInputStream; |
7 |
import org.freehep.graphicsio.emf.EMFOutputStream; |
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
@author |
14 |
@version |
15 |
|
16 |
public class Restore extends EMFPlusTag { |
17 |
|
18 |
private int containerIndex; |
19 |
|
20 |
public Restore() { |
21 |
super(38, 1); |
22 |
} |
23 |
|
24 |
public Restore(int containerIndex) { |
25 |
this(); |
26 |
flags = 0; |
27 |
this.containerIndex = containerIndex; |
28 |
} |
29 |
|
30 |
public EMFPlusTag read(int tagID, int flags, EMFInputStream emf, int len) |
31 |
throws IOException { |
32 |
Restore tag = new Restore(); |
33 |
tag.flags = flags; |
34 |
tag.containerIndex = emf.readUINT(); |
35 |
return tag; |
36 |
} |
37 |
|
38 |
public void write(int tagID, int flags, EMFOutputStream emf) throws IOException { |
39 |
emf.writeUINT(containerIndex); |
40 |
} |
41 |
|
42 |
public String toString() { |
43 |
return super.toString() + "\n index: "+containerIndex; |
44 |
} |
45 |
} |