Examples of TagEntry


Examples of com.google.gdata.data.photos.TagEntry

      }
    }
  }

  private void createTag(PhotoEntry photoEntry) throws Exception {
    TagEntry tag = new TagEntry();

    String title = getString("Tag");
    tag.setTitle(new PlainTextConstruct(title));

    insert(photoEntry, tag);
  }
View Full Code Here

Examples of gnu.java.awt.color.TagEntry

        ProfileData profile = profiles.get( (int)profileID );
        if( tagSignature == ICC_Profile.icSigHead ) {
            byte[] src = profile.data;
            System.arraycopy( src, 0, data, 0, HEADER_SIZE );
        } else {
            TagEntry entry = profile.tags.get( tagSignature );
            if( entry == null ){
                throw new CMMException( "tag does not exist: " + tagSignature );
            }
            byte[] src = entry.getData();
            System.arraycopy( src, 0, data, 0, src.length );
        }
       
    }
View Full Code Here

Examples of gnu.java.awt.color.TagEntry

    public int getTagSize( long profileID, int tagSignature ) {
        if( tagSignature == ICC_Profile.icSigHead ) {
            return HEADER_SIZE;
        }
        ProfileData profile = profiles.get( (int)profileID );
        TagEntry entry = profile.tags.get( tagSignature );
        if( entry == null ){
            throw new CMMException( "tag does not exist: " + tagSignature );
        }
        return entry.getData().length;
    }
View Full Code Here

Examples of gnu.java.awt.color.TagEntry

            Hashtable<Integer, TagEntry> tagTable = new Hashtable<Integer, TagEntry>();
            for( int i = 0; i < nTags; i++ ) {
                int sig = buf.getInt( HEADER_SIZE + i * TagEntry.entrySize + 4 );
                int offset = buf.getInt( HEADER_SIZE + i * TagEntry.entrySize + 8 );
                int size = buf.getInt( HEADER_SIZE + i * TagEntry.entrySize + 12 );
                TagEntry te = new TagEntry( sig, offset, size, data );

                if( tagTable.put( sig, te ) != null )
                    throw new IllegalArgumentException( "Duplicate tag in profile:" + te );
            }
            return tagTable;
View Full Code Here

Examples of gnu.java.awt.color.TagEntry

    System.arraycopy(tt, 0, data, ProfileHeader.HEADERSIZE, tt.length);

    Enumeration e = tagTable.elements();
    while (e.hasMoreElements())
      {
  TagEntry tag = (TagEntry) e.nextElement();
  System.arraycopy(tag.getData(), 0,
       data, tag.getOffset(), tag.getSize());
      }
    return data;
  }
View Full Code Here

Examples of gnu.java.awt.color.TagEntry

  public byte[] getData(int tagSignature)
  {
    if (tagSignature == icSigHead)
      return header.getData(getSize());

    TagEntry t = (TagEntry) tagTable.get(TagEntry.tagHashKey(tagSignature));
    if (t == null)
      return null;
    return t.getData();
  }
View Full Code Here

Examples of gnu.java.awt.color.TagEntry

    if (tagSignature == icSigHead)
      header = new ProfileHeader(data);
    else
      {
  TagEntry t = new TagEntry(tagSignature, data);
  tagTable.put(t.hashKey(), t);
      }
  }
View Full Code Here

Examples of gnu.java.awt.color.TagEntry

    int nTags = buf.getInt(tagTableOffset);

    Hashtable tagTable = new Hashtable();
    for (int i = 0; i < nTags; i++)
      {
  TagEntry te = new TagEntry(buf.getInt(tagTableOffset
                                        + i * TagEntry.entrySize + 4),
                             buf.getInt(tagTableOffset
                                        + i * TagEntry.entrySize + 8),
                             buf.getInt(tagTableOffset
                                        + i * TagEntry.entrySize + 12),
                             data);

  if (tagTable.put(te.hashKey(), te) != null)
    throw new IllegalArgumentException("Duplicate tag in profile:" + te);
      }
    return tagTable;
  }
View Full Code Here

Examples of gnu.java.awt.color.TagEntry

    buf.putInt(tagTable.size()); // number of tags

    Enumeration e = tagTable.elements();
    while (e.hasMoreElements())
      {
  TagEntry tag = (TagEntry) e.nextElement();
  buf.putInt(offset, tag.getSignature());
  buf.putInt(offset + 4, tagOffset);
  buf.putInt(offset + 8, tag.getSize());
  tag.setOffset(tagOffset);
  int tagSize = tag.getSize();
  if ((tagSize & 0x0003) != 0)
    tagSize += 4 - (tagSize & 0x0003); // pad     
  tagOffset += tagSize;
  offset += 12;
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.