1 50 51 package com.lowagie.text.rtf.field; 52 53 import java.io.IOException ; 54 import java.io.OutputStream ; 55 56 import com.lowagie.text.Font; 57 import com.lowagie.text.rtf.document.RtfDocument; 58 59 60 68 public class RtfPageNumber extends RtfField { 69 70 73 private static final byte[] PAGE_NUMBER = "PAGE".getBytes(); 74 75 78 public RtfPageNumber() { 79 super(null); 80 } 81 82 87 public RtfPageNumber(Font font) { 88 super(null, font); 89 } 90 91 96 public RtfPageNumber(RtfDocument doc) { 97 super(doc); 98 } 99 100 106 public RtfPageNumber(RtfDocument doc, Font font) { 107 super(doc, font); 108 } 109 110 117 protected byte[] writeFieldInstContent() throws IOException 118 { 119 return PAGE_NUMBER; 120 } 121 126 protected void writeFieldInstContent(final OutputStream out) throws IOException 127 { 128 out.write(PAGE_NUMBER); 129 } 130 131 138 protected byte[] writeFieldResultContent() throws IOException 139 { 140 return new byte[0]; 141 } 142 147 protected void writeFieldResultContent(final OutputStream out) throws IOException 148 { 149 } 150 } 151 | Popular Tags |