Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| PDF Clown 0.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfclown.objects
Class PdfString

    java.lang.Object
      org.pdfclown.objects.PdfObject
          org.pdfclown.objects.PdfDataObject
              org.pdfclown.objects.PdfDirectObject
                  org.pdfclown.objects.PdfSimpleObject<byte[]>
                      org.pdfclown.objects.PdfString

All Implemented Interfaces:
  Cloneable, Comparable<PdfDirectObject>, IVisitable, IDataWrapper

Direct Known Subclasses:
  PdfDate, PdfTextString

    public class PdfString

extends PdfSimpleObject<byte[]>
implements IDataWrapper

PDF string object [PDF:1.6:3.2.3].

A string object consists of a series of bytes.

String objects can be serialized in two ways:

- as a sequence of literal characters (plain form)
- as a sequence of hexadecimal digits (hexadecimal form)

Since:
  0.0.6
Version:
  0.1.2, 12/21/12
Author:
  Stefano Chizzolini (http://www.stefanochizzolini.it)

Nested Class Summary
`static class` | `PdfString.SerializationModeEnum` String serialization mode.

Field Summary
`static PdfString` | `Default`

Constructor Summary
`protected` | `PdfString()`
`` | `PdfString(byte[] rawValue)`
`` | `PdfString(byte[] rawValue, PdfString.SerializationModeEnum serializationMode)`
`` | `PdfString(String value)`
`` | `PdfString(String value, PdfString.SerializationModeEnum serializationMode)`

Method Summary
`PdfObject` | `accept(IVisitor visitor, Object data)` Accepts a visit.
`int` | `compareTo(PdfDirectObject object)`
`PdfString.SerializationModeEnum` | `getSerializationMode()` Gets the serialization mode.
`String` | `getStringValue()`
`Object` | `getValue()` Gets the high-level representation of the value.
`void` | `setSerializationMode(PdfString.SerializationModeEnum value)`
`protected void` | `setValue(Object value)`
`byte[]` | `toByteArray()` Gets the buffer data copied to a newly-allocated byte array.
`String` | `toString()`
`void` | `writeTo(IOutputStream stream, File context)` Serializes this object to the specified stream.

Methods inherited from class org.pdfclown.objects.PdfSimpleObject
`clone, equals, get, getParent, getRawValue, getValue, getValue, hashCode, isUpdateable, isUpdated, isVirtual, setRawValue, setUpdateable, setUpdated, setVirtual, swap`

Methods inherited from class org.pdfclown.objects.PdfObject
`clone, clone, getContainer, getDataContainer, getFile, getIndirectObject, getReference, resolve, resolve, unresolve, unresolve, update`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### Default

    public static final PdfString Default

Constructor Detail

### PdfString

    public PdfString(byte[] rawValue)

### PdfString

    public PdfString(String value)

### PdfString

    public PdfString(byte[] rawValue,
                     PdfString.SerializationModeEnum serializationMode)

### PdfString

    public PdfString(String value,
                     PdfString.SerializationModeEnum serializationMode)

### PdfString

    protected PdfString()

Method Detail

### accept

    public PdfObject accept(IVisitor visitor,
                            Object data)

  Description copied from interface: `IVisitable`
  Accepts a visit.

  Specified by:
    `accept` in interface `IVisitable`
  Parameters:
    `visitor` - Visiting object.
    `data` - Supplemental data.
  Returns:
    Result object.

### compareTo

    public int compareTo(PdfDirectObject object)

  Specified by:
    `compareTo` in interface `Comparable<PdfDirectObject>`
  Specified by:
    `compareTo` in class `PdfDirectObject`

### getSerializationMode

    public PdfString.SerializationModeEnum getSerializationMode()

  Gets the serialization mode.

### getStringValue

    public String getStringValue()

### getValue

    public Object getValue()

  Description copied from class: `PdfSimpleObject`
  Gets the high-level representation of the value.

  Overrides:
    `getValue` in class `PdfSimpleObject<byte[]>`

### setSerializationMode

    public void setSerializationMode(PdfString.SerializationModeEnum value)

  See Also:
    `getSerializationMode()`

### toByteArray

    public byte[] toByteArray()

  Description copied from interface: `IDataWrapper`
  Gets the buffer data copied to a newly-allocated byte array.

  Specified by:
    `toByteArray` in interface `IDataWrapper`

### toString

    public String toString()

  Overrides:
    `toString` in class `PdfSimpleObject<byte[]>`

### writeTo

    public void writeTo(IOutputStream stream,
                        File context)

  Description copied from class: `PdfObject`
  Serializes this object to the specified stream.

  Specified by:
    `writeTo` in class `PdfObject`
  Parameters:
    `stream` - Target stream.
    `context` - File context.

### setValue

    protected void setValue(Object value)

  Overrides:
    `setValue` in class `PdfSimpleObject<byte[]>`
  See Also:
    `PdfSimpleObject.getValue()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| PDF Clown 0.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Project home page
Copyright © 2006-2013 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.