1 package com.etymon.pj.object; 2 3 import java.io.*; 4 5 9 public class PjName 10 extends PjObject { 11 12 16 public PjName(String s) { 17 _s = s; 18 } 19 20 24 public String getString() { 25 return _s; 26 } 27 28 34 public long writePdf(OutputStream os) throws IOException { 35 long z = write(os, "/"); 36 int length = _s.length(); 37 char c; 38 for (int x = 0; x < length; x++) { 39 c = _s.charAt(x); 40 if (Character.isISOControl(c)) { 41 z = z + write(os, "#" + Integer.toHexString((int)c)); 42 } else { 43 z = z + write(os, c); 44 } 45 } 46 return z; 47 } 48 49 67 68 74 public boolean equals(Object obj) { 75 if (obj == null) { 76 return false; 77 } 78 if (obj instanceof PjName) { 79 return _s.equals(((PjName)obj)._s); 80 } else { 81 return false; 82 } 83 } 84 85 89 public Object clone() { 90 return this; 91 } 92 93 97 public int hashCode() { 98 return _s.hashCode(); 99 } 100 101 public static final PjName AA = new PjName("AA"); 102 public static final PjName ACROFORM = new PjName("AcroForm"); 103 public static final PjName ANNOTS = new PjName("Annots"); 104 public static final PjName AP = new PjName("AP"); 105 public static final PjName ASCENT = new PjName("Ascent"); 106 public static final PjName ASCII85DECODE = new PjName("ASCII85Decode"); 107 public static final PjName ASCIIHEXDECODE = new PjName("ASCIIHexDecode"); 108 public static final PjName AUTHOR = new PjName("Author"); 109 public static final PjName AVGWIDTH = new PjName ("AvgWidth"); 110 public static final PjName B = new PjName("B"); 111 public static final PjName BASEENCODING = new PjName("BaseEncoding"); 112 public static final PjName BASEFONT = new PjName("BaseFont"); 113 public static final PjName CAPHEIGHT = new PjName("CapHeight"); 114 public static final PjName CATALOG = new PjName("Catalog"); 115 public static final PjName CCITTFAXDECODE = new PjName("CCITTFaxDecode"); 116 public static final PjName CHARSET = new PjName ("CharSet"); 117 public static final PjName COLORSPACE = new PjName("ColorSpace"); 118 public static final PjName CONTENTS = new PjName("Contents"); 119 public static final PjName COUNT = new PjName("Count"); 120 public static final PjName CREATIONDATE = new PjName("CreationDate"); 121 public static final PjName CREATOR = new PjName("Creator"); 122 public static final PjName CROPBOX = new PjName("CropBox"); 123 public static final PjName DA = new PjName("DA"); 124 public static final PjName DCTDECODE = new PjName("DCTDecode"); 125 public static final PjName DECODEPARMS = new PjName("DecodeParms"); 126 public static final PjName DESCENT = new PjName("Descent"); 127 public static final PjName DESTS = new PjName("Dests"); 128 public static final PjName DIFFERENCES = new PjName("Differences"); 129 public static final PjName DR = new PjName("DR"); 130 public static final PjName DUR = new PjName("Dur"); 131 public static final PjName DV = new PjName("DV"); 132 public static final PjName ENCODING = new PjName("Encoding"); 133 public static final PjName ENCRYPT = new PjName("Encrypt"); 134 public static final PjName EXTGSTATE = new PjName("ExtGState"); 135 public static final PjName F = new PjName("F"); 136 public static final PjName FDECODEPARMS = new PjName("FDecodeParms"); 137 public static final PjName FIELDS = new PjName("Fields"); 138 public static final PjName FF = new PjName("Ff"); 139 public static final PjName FFILTER = new PjName("FFilter"); 140 public static final PjName FILTER = new PjName("Filter"); 141 public static final PjName FIRSTCHAR = new PjName("FirstChar"); 142 public static final PjName FLAGS = new PjName("Flags"); 143 public static final PjName FLATEDECODE = new PjName("FlateDecode"); 144 public static final PjName FONT = new PjName("Font"); 145 public static final PjName FONTBBOX = new PjName("FontBBox"); 146 public static final PjName FONTDESCRIPTOR = new PjName("FontDescriptor"); 147 public static final PjName FONTFILE = new PjName ("FontFile"); 148 public static final PjName FONTFILE2 = new PjName ("FontFile2"); 149 public static final PjName FONTFILE3 = new PjName ("FontFile3"); 150 public static final PjName FONTNAME = new PjName("FontName"); 151 public static final PjName FT = new PjName("FT"); 152 public static final PjName H = new PjName("H"); 153 public static final PjName HID = new PjName("Hid"); 154 public static final PjName I = new PjName("I"); 155 public static final PjName ID = new PjName("ID"); 156 public static final PjName IMAGEB = new PjName("ImageB"); 157 public static final PjName IMAGEC = new PjName("ImageC"); 158 public static final PjName IMAGEI = new PjName("ImageI"); 159 public static final PjName INFO = new PjName("Info"); 160 public static final PjName ITALICANGLE = new PjName("ItalicAngle"); 161 public static final PjName KEYWORDS = new PjName("Keywords"); 162 public static final PjName KIDS = new PjName("Kids"); 163 public static final PjName LASTCHAR = new PjName("LastChar"); 164 public static final PjName LEADING = new PjName ("Leading"); 165 public static final PjName LENGTH = new PjName("Length"); 166 public static final PjName LZWDECODE = new PjName("LZWDecode"); 167 public static final PjName MAXLEN = new PjName ("MaxLen"); 168 public static final PjName MAXWIDTH = new PjName ("MaxWidth"); 169 public static final PjName MEDIABOX = new PjName("MediaBox"); 170 public static final PjName MISSINGWIDTH = new PjName ("MissingWidth"); 171 public static final PjName MODDATE = new PjName("ModDate"); 172 public static final PjName N = new PjName("N"); 173 public static final PjName NAME = new PjName("Name"); 174 public static final PjName NAMES = new PjName("Names"); 175 public static final PjName O = new PjName("O"); 176 public static final PjName OPENACTION = new PjName("OpenAction"); 177 public static final PjName OPT = new PjName("Opt"); 178 public static final PjName OUTLINES = new PjName("Outlines"); 179 public static final PjName P = new PjName("P"); 180 public static final PjName PAGE = new PjName("Page"); 181 public static final PjName PAGEMODE = new PjName("PageMode"); 182 public static final PjName PAGES = new PjName("Pages"); 183 public static final PjName PARENT = new PjName("Parent"); 184 public static final PjName PATTERN = new PjName("Pattern"); 185 public static final PjName PDF = new PjName("PDF"); 186 public static final PjName PREV = new PjName("Prev"); 187 public static final PjName PROCSET = new PjName("ProcSet"); 188 public static final PjName PRODUCER = new PjName("Producer"); 189 public static final PjName PROPERTIES = new PjName("Properties"); 190 public static final PjName Q = new PjName("Q"); 191 public static final PjName RECT = new PjName("Rect"); 192 public static final PjName RESOURCES = new PjName("Resources"); 193 public static final PjName ROOT = new PjName("Root"); 194 public static final PjName ROTATE = new PjName("Rotate"); 195 public static final PjName RUNLENGTHDECODE = new PjName("RunLengthDecode"); 196 public static final PjName STEMH = new PjName ("StemH"); 197 public static final PjName STEMV = new PjName("StemV"); 198 public static final PjName SUBJECT = new PjName("Subject"); 199 public static final PjName SUBTYPE = new PjName("Subtype"); 200 public static final PjName TEXT = new PjName("Text"); 201 public static final PjName THUMB = new PjName("Thumb"); 202 public static final PjName THREADS = new PjName("Threads"); 203 public static final PjName TITLE = new PjName("Title"); 204 public static final PjName TOPINDEX = new PjName("TopIndex"); 205 public static final PjName TRANS = new PjName("Trans"); 206 public static final PjName TYPE = new PjName("Type"); 207 public static final PjName TYPE1 = new PjName("Type1"); 208 public static final PjName URI = new PjName("URI"); 209 public static final PjName V = new PjName("V"); 210 public static final PjName VIEWERPREFERENCES = new PjName("VIEWERPREFERENCES"); 211 public static final PjName W = new PjName("W"); 212 public static final PjName WIDTHS = new PjName("Widths"); 213 public static final PjName XHEIGHT = new PjName ("XHeight"); 214 public static final PjName XOBJECT = new PjName("XObject"); 215 216 private String _s; 217 218 } 219 | Popular Tags |