edu.harvard.hul.ois.jhove.module.pdf
Class PdfSimpleObject

java.lang.Object
  extended by edu.harvard.hul.ois.jhove.module.pdf.PdfObject
      extended by edu.harvard.hul.ois.jhove.module.pdf.PdfSimpleObject

public class PdfSimpleObject
extends PdfObject

A representation of a PDF object which can be represented by a Token. In some cases, this means that the full content of the object isn't stored, because we don't (think we) need it for our purposes.


Field Summary
 
Fields inherited from class edu.harvard.hul.ois.jhove.module.pdf.PdfObject
_genNumber, _objNumber
 
Constructor Summary
PdfSimpleObject(Token token)
          Creates a PdfSimpleObject.
PdfSimpleObject(Token token, int objNumber, int genNumber)
          Creates a PdfSimpleObject.
 
Method Summary
 double getDoubleValue()
          Return the double value of the token.
 int getIntValue()
          Return the integer value of the token.
 java.util.Vector getRawBytes()
          Return the raw bytes of the token, as a Vector of Integer objects.
 java.lang.String getStringValue()
          Return the string value of the token.
 Token getToken()
          Returns the token represented by this object.
 boolean isFalse()
          Return true if the value of the token is the keyword "false", and false otherwise.
 boolean isTrue()
          Return true if the value of the token is the keyword "true", and false otherwise.
 
Methods inherited from class edu.harvard.hul.ois.jhove.module.pdf.PdfObject
getGenNumber, getObjNumber, setGenNumber, setObjNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfSimpleObject

public PdfSimpleObject(Token token,
                       int objNumber,
                       int genNumber)
Creates a PdfSimpleObject.

Parameters:
objNumber - The PDF object number
genNumber - The PDF generation number
token - The Token represented by this object

PdfSimpleObject

public PdfSimpleObject(Token token)
Creates a PdfSimpleObject.

Parameters:
token - The Token represented by this object
Method Detail

getToken

public Token getToken()
Returns the token represented by this object.


getStringValue

public java.lang.String getStringValue()
Return the string value of the token. Returns null if the token is not a StringValuedToken.


getRawBytes

public java.util.Vector getRawBytes()
Return the raw bytes of the token, as a Vector of Integer objects. Returns null if the token is not a StringValuedToken.


getIntValue

public int getIntValue()
Return the integer value of the token. Throws a ClassCastException if the token is not a Numeric.


getDoubleValue

public double getDoubleValue()
Return the double value of the token. Throws a ClassCastException if the token is not a Numeric.


isTrue

public boolean isTrue()
Return true if the value of the token is the keyword "true", and false otherwise.


isFalse

public boolean isFalse()
Return true if the value of the token is the keyword "false", and false otherwise.