1 51 package org.apache.fop.render.ps; 52 53 import java.io.*; 54 55 public class PSStream extends FilterOutputStream { 56 57 public PSStream(OutputStream out) { 58 super(out); 59 } 60 61 public void write(String cmd) throws IOException { 62 if (cmd.length() > 255) 63 throw new RuntimeException ("PostScript command exceeded limit of 255 characters"); 64 write(cmd.getBytes("US-ASCII")); 65 write('\n'); 66 } 67 68 public void writeByteArr(byte[] cmd) throws IOException { 69 write(cmd); 70 write('\n'); 71 } 72 } 73 | Popular Tags |