Package org.farng.mp3.filename

Examples of org.farng.mp3.filename.FilenameTagBuilder


     * @param object     new object value
     */
    public void setObject(final String identifier, final Object object) {
        final Iterator iterator = objectList.listIterator();
        while (iterator.hasNext()) {
            final AbstractMP3Object abstractMP3Object = (AbstractMP3Object) iterator.next();
            final String currentIdentifier = abstractMP3Object.getIdentifier();
            if (currentIdentifier.equals(identifier)) {
                abstractMP3Object.setValue(object);
            }
        }
    }
View Full Code Here


     */
    public Object getObject(final String identifier) {
        Object object = null;
        final Iterator iterator = objectList.listIterator();
        while (iterator.hasNext()) {
            final AbstractMP3Object abstractMP3Object = (AbstractMP3Object) iterator.next();
            final String currentIdentifier = abstractMP3Object.getIdentifier();
            if (currentIdentifier.equals(identifier)) {
                object = abstractMP3Object.getValue();
            }
        }
        return object;
    }
View Full Code Here

    public int getSize() {
        //todo get this working 100% of the time
        int size = 0;
        final Iterator iterator = objectList.listIterator();
        while (iterator.hasNext()) {
            final AbstractMP3Object object = (AbstractMP3Object) iterator.next();
            size += object.getSize();
        }
        return size;
    }
View Full Code Here

            return false;
        }
        final List superset = ((AbstractMP3FragmentBody) object).objectList;
        final int objectListSize = objectList.size();
        for (int i = 0; i < objectListSize; i++) {
            final AbstractMP3Object abstractMP3Object = (AbstractMP3Object) objectList.get(i);
            if (abstractMP3Object.getValue() != null && !superset.contains(abstractMP3Object)) {
                return false;
            }
        }
        return true;
    }
View Full Code Here

            if (offset > size - 1) {
                throw new InvalidTagException("Invalid size for Frame Body");
            }

            // sanjay@revasoft.com end bug fix
            final AbstractMP3Object object = (AbstractMP3Object) iterator.next();
            object.readByteArray(buffer, offset);
            offset += object.getSize();
        }
    }
View Full Code Here

        final String thisIdentifier = getIdentifier();
        stringBuffer.append(thisIdentifier);
        stringBuffer.append(TagConstant.SEPERATOR_LINE);
        final Iterator iterator = objectList.listIterator();
        while (iterator.hasNext()) {
            final AbstractMP3Object object = (AbstractMP3Object) iterator.next();
            final String objectIdentifier = object.getIdentifier();
            stringBuffer.append(objectIdentifier);
            stringBuffer.append(" = ");
            final String string = object.toString();
            stringBuffer.append(string);
            stringBuffer.append(TagConstant.SEPERATOR_LINE);
        }
        return stringBuffer.toString();
    }
View Full Code Here

    public void write(final RandomAccessFile file) throws IOException {
        final int size = getSize();
        writeHeader(file, size);
        final Iterator iterator = objectList.listIterator();
        while (iterator.hasNext()) {
            final AbstractMP3Object object = (AbstractMP3Object) iterator.next();
            final byte[] buffer = object.writeByteArray();
            file.write(buffer);
        }
    }
View Full Code Here

    public FieldBodyLYR(final FieldBodyLYR copyObject) {
        super(copyObject);
        ObjectLyrics3Line oldObject;
        for (int i = 0; i < copyObject.lines.size(); i++) {
            oldObject = (ObjectLyrics3Line) copyObject.lines.get(i);
            AbstractMP3Object newObject = new ObjectLyrics3Line(oldObject);
            this.lines.add(newObject);
//            appendToObjectList(newObject);
        }
    }
View Full Code Here

        setObject("Owner", description);
    }

    public void addGroup(final byte event, final int timeStamp) {
        final ObjectGroupRepeated group = (ObjectGroupRepeated) this.getObject("Data");
        final AbstractMP3Object ev = new ObjectNumberHashMap("Type Of Event", 1);
        final AbstractMP3Object ts = new ObjectNumberFixedLength("Time Stamp", 4);
        group.addObject(ev);
        group.addObject(ts);
        setObject("Data", group);
    }
View Full Code Here

    public String getIdentifier() {
        return "IND";
    }

    protected void setupObjectList() {
        appendToObjectList(new ObjectBooleanString("Lyrics Present"));
        appendToObjectList(new ObjectBooleanString("Timestamp Present"));
    }
View Full Code Here

TOP

Related Classes of org.farng.mp3.filename.FilenameTagBuilder

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.