Package org.farng.mp3

Examples of org.farng.mp3.InvalidTagException


            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

        return (String) getObject("Owner");
    }

    protected void setupObjectList() {
        appendToObjectList(new ObjectStringNullTerminated("Owner"));
        appendToObjectList(new ObjectByteArraySizeTerminated("Identifier"));
    }
View Full Code Here

    }

    protected void setupObjectList() {
        appendToObjectList(new ObjectStringNullTerminated("Owner"));
        appendToObjectList(new ObjectNumberFixedLength("Group Symbol", 1));
        appendToObjectList(new ObjectByteArraySizeTerminated("Group Dependent Data"));
    }
View Full Code Here

    public void getOwner(final String description) {
        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

TOP

Related Classes of org.farng.mp3.InvalidTagException

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.