public class PdfName extends PdfObject
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
_s
The string value of this name object.
|
| Constructor and Description |
|---|
PdfName(java.lang.String s)
Constructs a name object representing a string value.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Compares this instance with another PDF object for equality.
|
java.lang.String |
getString()
Returns the string value of this name object.
|
int |
hashCode()
Returns a hash code for this object.
|
protected static java.lang.String |
pdfToString(java.lang.String pdf)
Converts a name object in PDF format to a string value as
stored by this class.
|
protected int |
writePdf(PdfWriter w,
boolean spacing)
Writes this object in PDF format.
|
clone, filter, filterContents, toStringpublic PdfName(java.lang.String s)
s - the string value.public boolean equals(java.lang.Object obj)
PdfObjectpublic java.lang.String getString()
public int hashCode()
PdfObjectprotected static java.lang.String pdfToString(java.lang.String pdf)
throws PdfFormatException
pdf - the name object in PDF format.PdfFormatExceptionprotected int writePdf(PdfWriter w, boolean spacing) throws java.io.IOException
PdfObjectwritePdf in class PdfObjectw - the PdfWriter to write to.spacing - specifies whether to add white-space before
the object. A value of true enables the
addition of white-space. If the object begins with a PDF
delimiter, then this option is ignored and no white-space
is written.java.io.IOException