Package org.farng.mp3.object

Examples of org.farng.mp3.object.ObjectNumberHashMap


        // 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<AbstractMP3Object>();
        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


            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

    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");
View Full Code Here

    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");
View Full Code Here

    public String getText() {
        return (String) getObject("Date Time");
    }

    protected void setupObjectList() {
        appendToObjectList(new ObjectNumberHashMap(ObjectNumberHashMap.TEXT_ENCODING, 1));
        appendToObjectList(new ObjectStringDateTime("Date Time"));
    }
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

        group.addObject(ts);
        setObject("Data", group);
    }

    protected void setupObjectList() {
        appendToObjectList(new ObjectNumberHashMap("Time Stamp Format", 1));
        final ObjectGroupRepeated group = new ObjectGroupRepeated("Data");
        group.addProperty(new ObjectNumberHashMap("Type Of Event", 1));
        group.addProperty(new ObjectNumberFixedLength("Time Stamp", 4));
        appendToObjectList(group);
    }
View Full Code Here

    public void addLyric(final ObjectLyrics3Line line) {
        setLyric(getLyric() + line.writeString());
    }

    protected void setupObjectList() {
        appendToObjectList(new ObjectNumberHashMap("Text Encoding", 1));
        appendToObjectList(new ObjectStringHashMap("Language", 3));
        appendToObjectList(new ObjectStringNullTerminated("Description"));
        appendToObjectList(new ObjectStringSizeTerminated("Lyrics/Text"));
    }
View Full Code Here

    public String getText() {
        return (String) getObject("Text");
    }

    protected void setupObjectList() {
        appendToObjectList(new ObjectNumberHashMap("Text Encoding", 1));
        appendToObjectList(new ObjectStringNullTerminated("Description"));
        appendToObjectList(new ObjectStringSizeTerminated("Text"));
    }
View Full Code Here

    public String getText() {
        return (String) getObject("Date Time");
    }

    protected void setupObjectList() {
        appendToObjectList(new ObjectNumberHashMap(ObjectNumberHashMap.TEXT_ENCODING, 1));
        appendToObjectList(new ObjectStringDateTime("Date Time"));
    }
View Full Code Here

TOP

Related Classes of org.farng.mp3.object.ObjectNumberHashMap

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.