org.apache.fop.pdf

## Class PDFName

- java.lang.Object
- - org.apache.fop.pdf.PDFObject
  - - org.apache.fop.pdf.PDFName

- All Implemented Interfaces:
    java.io.Serializable, PDFWritable

      public class PDFName
      extends PDFObject
      implements java.io.Serializable

  Class representing a PDF name object.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.apache.fop.pdf.PDFObject

      `log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PDFName(java.lang.String name)` Creates a new PDF name object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `java.lang.String` | `getName()` Returns the name without the leading slash.
    `int` | `hashCode()`
    `int` | `output(java.io.OutputStream stream)` Write the PDF represention of this object
    `void` | `outputInline(java.io.OutputStream out, java.lang.StringBuilder textBuffer)` Writes a "direct object" (inline object) representation to the stream.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.apache.fop.pdf.PDFObject

      `contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getChildren, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, toPDF, toPDFString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PDFName

          public PDFName(java.lang.String name)

      Creates a new PDF name object.
      Parameters:
        `name` - the name value

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getName

          public java.lang.String getName()

      Returns the name without the leading slash.
      Returns:
        the name without the leading slash

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### output

          public int output(java.io.OutputStream stream)
                     throws java.io.IOException

      Description copied from class: `PDFObject`
      Write the PDF represention of this object
      Overrides:
        `output` in class `PDFObject`
      Parameters:
        `stream` - the stream to write the PDF to
      Returns:
        the number of bytes written
      Throws:
        `java.io.IOException` - if there is an error writing to the stream

    - #### outputInline

          public void outputInline(java.io.OutputStream out,
                                   java.lang.StringBuilder textBuffer)
                            throws java.io.IOException

      Description copied from class: `PDFObject`
      Writes a "direct object" (inline object) representation to the stream. A text buffer is given for optimized encoding of text content.

      IMPORTANT: If you need to write out binary output, call `PDFDocument.flushTextBuffer(StringBuilder, OutputStream)` before writing any content to the `OutputStream`!

      Specified by:
        `outputInline` in interface `PDFWritable`
      Overrides:
        `outputInline` in class `PDFObject`
      Parameters:
        `out` - the OutputStream (for binary content)
        `textBuffer` - the text buffer for text content
      Throws:
        `java.io.IOException` - if an I/O error occurs

Copyright 1999-2021 The Apache Software Foundation. All Rights Reserved.