Examples of ContentDescription


Examples of entagged.audioformats.asf.data.ContentDescription

     * @throws IOException
     *                   read errors.
     */
    private ContentDescription parseData(RandomAccessFile raf)
            throws IOException {
        ContentDescription result = null;
        long chunkStart = raf.getFilePointer();
        GUID guid = Utils.readGUID(raf);
        if (GUID.GUID_CONTENTDESCRIPTION.equals(guid)) {
            BigInteger chunkLen = Utils.readBig64(raf);
            result = new ContentDescription(chunkStart, chunkLen);
            /*
             * Now comes 16-Bit values representing the length of the Strings
             * which follows.
             */
            int[] stringSizes = getStringSizes(raf);
            /*
             * Now we know the String length of each occuring String.
             */
            String[] strings = new String[stringSizes.length];
            for (int i = 0; i < strings.length; i++) {
                if (stringSizes[i] > 0)
                    strings[i] = readFixedSizeUTF16Str(raf, stringSizes[i]);
            }
            if (stringSizes[0] > 0)
                result.setTitle(strings[0]);
            if (stringSizes[1] > 0)
                result.setAuthor(strings[1]);
            if (stringSizes[2] > 0)
                result.setCopyRight(strings[2]);
            if (stringSizes[3] > 0)
                result.setComment(strings[3]);
            if (stringSizes[4] > 0)
                result.setRating(strings[4]);
        }
        return result;
    }
View Full Code Here

Examples of entagged.audioformats.asf.data.ContentDescription

            ContentDescription contentDescription, RandomAccessFile rafTemp)
            throws IOException {
        // Store current Location
        long chunkStart = rafTemp.getFilePointer();
        // Create a content description object out of tag values.
        ContentDescription description = TagConverter
                .createContentDescription(tag);
        // Add optional existing values which aren't covered with tag.
        if (contentDescription != null) {
            description.setRating(contentDescription.getRating());
        }
        // Create byte[] for the asf file.
        byte[] asfContent = description.getBytes();
        // write content
        rafTemp.write(asfContent);
        // Create chunk information
        return new Chunk(GUID.GUID_CONTENTDESCRIPTION, chunkStart, BigInteger
                .valueOf(asfContent.length));
View Full Code Here

Examples of entagged.audioformats.asf.data.ContentDescription

       */
      FileHeader fileHeader = null;
      ExtendedContentDescription extendedDescription = null;
      EncodingChunk encodingChunk = null;
      StreamChunk streamChunk = null;
      ContentDescription contentDescription = null;
      StreamBitratePropertiesChunk bitratePropertiesChunk = null;

      Iterator iterator = chunks.iterator();
      while (iterator.hasNext()) {
        Chunk currentChunk = (Chunk) iterator.next();
View Full Code Here

Examples of entagged.audioformats.asf.data.ContentDescription

     *                   This string will be set to each known field.
     * @return The number of errors occured.
     */
    private int testContentDescription(AsfHeader header, String toTest) {
        int errorCount = 0;
        ContentDescription desc = header.getContentDescription();
        try {
            desc.setAuthor(toTest);
        } catch (Exception e) {
            errorCount++;
        }
        try {
            desc.setComment(toTest);
        } catch (Exception e) {
            errorCount++;
        }
        try {
            desc.setCopyRight(toTest);
        } catch (Exception e) {
            errorCount++;
        }
        try {
            desc.setRating(toTest);
        } catch (Exception e) {
            errorCount++;
        }
        try {
            desc.setTitle(toTest);
        } catch (Exception e) {
            errorCount++;
        }
        return errorCount;
    }
View Full Code Here

Examples of entagged.audioformats.asf.data.ContentDescription

   * @see Tag#getFirstComment() <br>
   *
   * @return A new content description object filled with <code>tag</code>.
   */
  public static ContentDescription createContentDescription(Tag tag) {
    ContentDescription result = new ContentDescription();
    result.setAuthor(tag.getFirstArtist());
    result.setTitle(tag.getFirstTitle());
    result.setComment(tag.getFirstComment());
    TagTextField cpField = AsfCopyrightField.getCopyright(tag);
    if (cpField != null) {
      result.setCopyRight(cpField.getContent());
    }
    return result;
  }
View Full Code Here

Examples of org.jboss.as.console.client.widgets.ContentDescription

        {
            panel.add(headlineWidget);
        }

        if(null==description)
            panel.add(new ContentDescription("DESCRIPTION"));
        else
            panel.add(new ContentDescription(description.asString()));

        if(master!=null)
        {
            if(master.title!=null && !master.title.isEmpty())
                panel.add(new ContentGroupLabel(master.title));
View Full Code Here

Examples of org.jboss.as.console.client.widgets.ContentDescription

        serverName = new HTML("Replace me");
        serverName.setStyleName("content-header-label");

        panel.add(serverName);
        panel.add(new ContentDescription("Queue and Topic destinations."));

        // ----

        TabPanel bottomLayout = new TabPanel();
        bottomLayout.addStyleName("default-tabpanel");
View Full Code Here

Examples of org.jboss.as.console.client.widgets.ContentDescription

            }
        };

        form.setFields(input, output);

        panel.add(new ContentDescription("Expressions will be resolved against running server instances."));
        panel.add(form.asWidget());


        ClickHandler submitHandler = new ClickHandler() {
            @Override
View Full Code Here

Examples of org.jboss.as.console.client.widgets.ContentDescription

    public Widget createWidget() {

        LayoutPanel layout = new RHSContentPanel("System Properties");
        layout.add(new ContentHeaderLabel("System Properties"));

        layout.add(new ContentDescription(Console.CONSTANTS.properties_global_desc()));

        propertyEditor = new PropertyEditor(presenter, Console.getBootstrapContext().isStandalone(), 20);
        layout.add(propertyEditor.asWidget());
        propertyEditor.setAllowEditProps(false);
View Full Code Here

Examples of org.jboss.as.console.client.widgets.ContentDescription

        VerticalPanel layout = new VerticalPanel();
        layout.setStyleName("window-content");


        layout.add(new ContentDescription("<h3>Create copy</h3> You are about to create a copy of server-goup <b>'"+orig.getGroupName()+
                "'</b>. The newly created group will inherit all properties of the original."));

        final Form<ServerGroupRecord> form = new Form<ServerGroupRecord>(ServerGroupRecord.class);
        form.setNumColumns(1);
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.