1 17 18 19 20 package org.apache.fop.render.afp.modca; 21 22 import java.io.IOException ; 23 import java.io.OutputStream ; 24 import java.io.UnsupportedEncodingException ; 25 26 import org.apache.fop.render.afp.tools.BinaryUtils; 27 28 34 public class InvokeMediumMap extends AbstractNamedAFPObject { 35 36 40 public InvokeMediumMap(String mediumMapName) { 41 42 super(mediumMapName); 43 44 } 45 46 51 public void writeDataStream(OutputStream os) 52 throws IOException { 53 54 byte[] data = new byte[17]; 55 56 data[0] = 0x5A; 57 58 byte[] rl1 = BinaryUtils.convert(16, 2); data[1] = rl1[0]; 61 data[2] = rl1[1]; 62 63 data[3] = (byte) 0xD3; 65 data[4] = (byte) 0xAB; 66 data[5] = (byte) 0xCC; 67 68 data[6] = 0x00; data[7] = 0x00; data[8] = 0x00; 72 for (int i = 0; i < _nameBytes.length; i++) { 73 74 data[9 + i] = _nameBytes[i]; 75 76 } 77 78 os.write(data); 79 80 } 81 82 } | Popular Tags |