Examples of ObjectLyrics3Line


Examples of org.farng.mp3.object.ObjectLyrics3Line

    /**
     * Creates a new FieldBodyLYR object.
     */
    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

Examples of org.farng.mp3.object.ObjectLyrics3Line

        return writeString();
    }

    public int getSize() {
        int size = 0;
        ObjectLyrics3Line line;
        for (int i = 0; i < this.lines.size(); i++) {
            line = (ObjectLyrics3Line) this.lines.get(i);
            size += (line.getSize() + 2);
        }
        return size;
    }
View Full Code Here

Examples of org.farng.mp3.object.ObjectLyrics3Line

    }

    public void addLyric(final FrameBodySYLT sync) {
        // SYLT frames are made of individual lines
        final Iterator iterator = sync.iterator();
        ObjectLyrics3Line newLine;
        ObjectID3v2LyricLine currentLine;
        ObjectLyrics3TimeStamp timeStamp;
        final HashMap lineMap = new HashMap();
        while (iterator.hasNext()) {
            currentLine = (ObjectID3v2LyricLine) iterator.next();

            // create copy to use in new tag
            currentLine = new ObjectID3v2LyricLine(currentLine);
            timeStamp = new ObjectLyrics3TimeStamp("Time Stamp");
            timeStamp.setTimeStamp(currentLine.getTimeStamp(), sync.getTimeStampFormat());
            if (lineMap.containsKey(currentLine.getText())) {
                newLine = (ObjectLyrics3Line) lineMap.get(currentLine.getText());
                newLine.addTimeStamp(timeStamp);
            } else {
                newLine = new ObjectLyrics3Line("Lyric Line");
                newLine.setLyric(currentLine);
                newLine.setTimeStamp(timeStamp);
                lineMap.put(currentLine.getText(), newLine);
                this.lines.add(newLine);
//                appendToObjectList(newLine);
            }
        }
View Full Code Here

Examples of org.farng.mp3.object.ObjectLyrics3Line

        }
    }

    public void addLyric(final FrameBodyUSLT unsync) {
        // USLT frames are just long text string;
        final ObjectLyrics3Line line = new ObjectLyrics3Line("Lyric Line");
        line.setLyric(new String(unsync.getLyric()));
        this.lines.add(line);
        appendToObjectList(line);
    }
View Full Code Here

Examples of org.farng.mp3.object.ObjectLyrics3Line

        // now readString each line and put in the vector;
        String token;
        int offset = 0;
        int delim = lineString.indexOf(TagConstant.SEPERATOR_LINE);
        this.lines = new ArrayList();
        ObjectLyrics3Line line;
        while (delim >= 0) {
            token = lineString.substring(offset, delim);
            line = new ObjectLyrics3Line("Lyric Line");
            line.setLyric(token);
            this.lines.add(line);
            appendToObjectList(line);
            offset = delim + TagConstant.SEPERATOR_LINE.length();
            delim = lineString.indexOf(TagConstant.SEPERATOR_LINE, offset);
        }
        if (offset < lineString.length()) {
            token = lineString.substring(offset);
            line = new ObjectLyrics3Line("Lyric Line");
            line.setLyric(token);
            this.lines.add(line);
            appendToObjectList(line);
        }
    }
View Full Code Here

Examples of org.farng.mp3.object.ObjectLyrics3Line

            appendToObjectList(line);
        }
    }

    private String writeString() {
        ObjectLyrics3Line line;
        String str = "";
        for (int i = 0; i < this.lines.size(); i++) {
            line = (ObjectLyrics3Line) this.lines.get(i);
            str += (line.writeString() + TagConstant.SEPERATOR_LINE);
        }
        return str;
    }
View Full Code Here

Examples of org.farng.mp3.object.ObjectLyrics3Line

    /**
     * Creates a new FieldBodyLYR object.
     */
    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

Examples of org.farng.mp3.object.ObjectLyrics3Line

        return writeString();
    }

    public int getSize() {
        int size = 0;
        ObjectLyrics3Line line;
        for (int i = 0; i < this.lines.size(); i++) {
            line = (ObjectLyrics3Line) this.lines.get(i);
            size += (line.getSize() + 2);
        }
        return size;
    }
View Full Code Here

Examples of org.farng.mp3.object.ObjectLyrics3Line

    }

    public void addLyric(final FrameBodySYLT sync) {
        // SYLT frames are made of individual lines
        final Iterator<?> iterator = sync.iterator();
        ObjectLyrics3Line newLine;
        ObjectID3v2LyricLine currentLine;
        ObjectLyrics3TimeStamp timeStamp;
        final HashMap<String, ObjectLyrics3Line> lineMap = new HashMap<String, ObjectLyrics3Line>();
        while (iterator.hasNext()) {
            currentLine = (ObjectID3v2LyricLine) iterator.next();

            // create copy to use in new tag
            currentLine = new ObjectID3v2LyricLine(currentLine);
            timeStamp = new ObjectLyrics3TimeStamp("Time Stamp");
            timeStamp.setTimeStamp(currentLine.getTimeStamp(), sync.getTimeStampFormat());
            if (lineMap.containsKey(currentLine.getText())) {
                newLine = (ObjectLyrics3Line) lineMap.get(currentLine.getText());
                newLine.addTimeStamp(timeStamp);
            } else {
                newLine = new ObjectLyrics3Line("Lyric Line");
                newLine.setLyric(currentLine);
                newLine.setTimeStamp(timeStamp);
                lineMap.put(currentLine.getText(), newLine);
                this.lines.add(newLine);
//                appendToObjectList(newLine);
            }
        }
View Full Code Here

Examples of org.farng.mp3.object.ObjectLyrics3Line

        }
    }

    public void addLyric(final FrameBodyUSLT unsync) {
        // USLT frames are just long text string;
        final ObjectLyrics3Line line = new ObjectLyrics3Line("Lyric Line");
        line.setLyric(new String(unsync.getLyric()));
        this.lines.add(line);
        appendToObjectList(line);
    }
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.