Home » pdfbox-1.1.0-src » org.apache.pdfbox.cos » [javadoc | source]
org.apache.pdfbox.cos
public class: COSString [javadoc | source]
java.lang.Object
   org.apache.pdfbox.cos.COSBase
      org.apache.pdfbox.cos.COSString

All Implemented Interfaces:
    COSObjectable

This represents a string object in a PDF document.
Field Summary
public static final  byte[] STRING_OPEN    One of the open string tokens. 
public static final  byte[] STRING_CLOSE    One of the close string tokens. 
public static final  byte[] HEX_STRING_OPEN    One of the open string tokens. 
public static final  byte[] HEX_STRING_CLOSE    One of the close string tokens. 
public static final  byte[] ESCAPE    the escape character in strings. 
public static final  byte[] CR_ESCAPE    CR escape characters. 
public static final  byte[] LF_ESCAPE    LF escape characters. 
public static final  byte[] HT_ESCAPE    HT escape characters. 
public static final  byte[] BS_ESCAPE    BS escape characters. 
public static final  byte[] FF_ESCAPE    FF escape characters. 
Constructor:
 public COSString() 
 public COSString(String value) 
    Explicit constructor for ease of manual PDF construction.
    Parameters:
    value - The string value of the object.
 public COSString(byte[] value) 
Method from org.apache.pdfbox.cos.COSString Summary:
accept,   append,   append,   createFromHexString,   equals,   getBytes,   getHexString,   getString,   hashCode,   reset,   setForceLiteralForm,   toString,   writePDF
Methods from org.apache.pdfbox.cos.COSBase:
accept,   getCOSObject,   getFilterManager
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.pdfbox.cos.COSString Detail:
 public Object accept(ICOSVisitor visitor) throws COSVisitorException 
    visitor pattern double dispatch method.
 public  void append(byte[] data) throws IOException 
    This will append a byte[] to the string.
 public  void append(int in) throws IOException 
    This will append a byte to the string.
 public static COSString createFromHexString(String hex) throws IOException 
    This will create a COS string from a string of hex characters.
 public boolean equals(Object obj) 
    {@inheritDoc}
 public byte[] getBytes() 
    This will get the bytes of the string.
 public String getHexString() 
    This will take this string and create a hex representation of the bytes that make the string.
 public String getString() 
    This will get the string that this object wraps.
 public int hashCode() 
    {@inheritDoc}
 public  void reset() 
    This will reset the internal buffer.
 public  void setForceLiteralForm(boolean v) 
    Forces the string to be written in literal form instead of hexadecimal form.
 public String toString() 
    {@inheritDoc}
 public  void writePDF(OutputStream output) throws IOException 
    This will output this string as a PDF object.