org.tritonus.lowlevel.pvorbis
Class Comment

java.lang.Object
  extended by org.tritonus.lowlevel.pvorbis.Comment
All Implemented Interfaces:
VorbisConstants

public class Comment
extends java.lang.Object
implements VorbisConstants

Wrapper for vorbis_comment.


Field Summary
 
Fields inherited from interface org.tritonus.lowlevel.pvorbis.VorbisConstants
OV_EBADHEADER, OV_EBADLINK, OV_EBADPACKET, OV_EFAULT, OV_EIMPL, OV_EINVAL, OV_ENOSEEK, OV_ENOTAUDIO, OV_ENOTVORBIS, OV_EOF, OV_EREAD, OV_EVERSION, OV_FALSE, OV_HOLE
 
Constructor Summary
Comment()
           
 
Method Summary
 void addComment(java.lang.String strComment)
          Adds a comment to the list of comments.
 void addTag(java.lang.String strTag, java.lang.String strContents)
          Adds a comment with a specific tag
 void clear()
          Calls vorbis_comment_clear().
 void finalize()
           
 void free()
           
 java.lang.String[] getUserComments()
          Accesses user_comments, comment_lengths and comments.
 java.lang.String getVendor()
          Accesses vendor.
 void init()
          Initializes the comment object.
 int pack(Buffer buffer)
           
 java.lang.String query(java.lang.String strTag, int nIndex)
          Calls vorbis_comment_query().
 int queryCount(java.lang.String strTag)
          Calls vorbis_comment_query_count().
 int unpack(Buffer buffer)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Comment

public Comment()
Method Detail

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object

free

public void free()

init

public void init()
Initializes the comment object. Sets the vendor string to null and removes all comments.


addComment

public void addComment(java.lang.String strComment)
Adds a comment to the list of comments. The passed string is added to the list of comments as it is. The string should have the format 'TAG=content'.


addTag

public void addTag(java.lang.String strTag,
                   java.lang.String strContents)
Adds a comment with a specific tag


queryCount

public int queryCount(java.lang.String strTag)
Calls vorbis_comment_query_count().


query

public java.lang.String query(java.lang.String strTag,
                              int nIndex)
Calls vorbis_comment_query().


getUserComments

public java.lang.String[] getUserComments()
Accesses user_comments, comment_lengths and comments.


getVendor

public java.lang.String getVendor()
Accesses vendor.


clear

public void clear()
Calls vorbis_comment_clear().


pack

public int pack(Buffer buffer)

unpack

public int unpack(Buffer buffer)