Package org.pdfclown.objects

Examples of org.pdfclown.objects.PdfDataObject


  @SuppressWarnings("unchecked")
  public <T> T[] toArray(
    T[] values
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Single annotation.
    {
      if(values.length == 0)
      {values = (T[])new Object[1];}
View Full Code Here


  // <private>
  private PdfArray ensureArray(
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject instanceof PdfDictionary) // Merged annotation.
    {
      PdfArray widgetsArray = new PdfArray();
      {
        PdfDictionary fieldDictionary = (PdfDictionary)baseDataObject;
View Full Code Here

  {//TODO: set symbolic = true/false; depending on the actual encoding!!!
    // Encoding.
    if(codes == null)
    {
      Map<ByteArray,Integer> codes;
      PdfDataObject encodingObject = getBaseDataObject().resolve(PdfName.Encoding);
      if(encodingObject == null) // Native encoding.
      {codes = getNativeEncoding();}
      else if(encodingObject instanceof PdfName) // Predefined encoding.
      {codes = Encoding.get((PdfName)encodingObject).getCodes();}
      else // Custom encoding.
View Full Code Here

  @Override
  public boolean containsKey(
    Object key
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject == null) // No state.
      return false;
    else if(baseDataObject instanceof PdfStream) // Single state.
      return (key == null);
    else // Multiple state.
View Full Code Here

    )
  {
    if(!(value instanceof FormXObject))
      return false;

    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject == null) // No state.
      return false;
    else if(baseDataObject instanceof PdfStream) // Single state.
      return ((FormXObject)value).getBaseObject().equals(getBaseObject());
    else // Multiple state.
View Full Code Here

  public Set<Map.Entry<PdfName,FormXObject>> entrySet(
    )
  {
    HashSet<Map.Entry<PdfName,FormXObject>> entrySet = new HashSet<Map.Entry<PdfName,FormXObject>>();
    {
      PdfDataObject baseDataObject = getBaseDataObject();
      if(baseDataObject == null) // No state.
      { /* NOOP. */ }
      else if(baseDataObject instanceof PdfStream) // Single state.
      {
        entrySet.add(
View Full Code Here

  @Override
  public FormXObject get(
    Object key
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject == null) // No state.
      return null;
    else if(key == null)
    {
      if(baseDataObject instanceof PdfStream) // Single state.
View Full Code Here

  @Override
  public boolean isEmpty(
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject == null) // No state.
      return true;
    else if(baseDataObject instanceof PdfStream) // Single state.
      return false;
    else // Multiple state.
View Full Code Here

  @Override
  public FormXObject remove(
    Object key
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject == null) // No state.
      return null;
    else
    {
      PdfDirectObject previousValue;
View Full Code Here

  @Override
  public int size(
    )
  {
    PdfDataObject baseDataObject = getBaseDataObject();
    if(baseDataObject == null) // No state.
      return 0;
    else if(baseDataObject instanceof PdfStream) // Single state.
      return 1;
    else // Multiple state.
View Full Code Here

TOP

Related Classes of org.pdfclown.objects.PdfDataObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.