org.jaudiotagger.tag.vorbiscomment
Class VorbisCommentReader
java.lang.Object
org.jaudiotagger.tag.vorbiscomment.VorbisCommentReader
public class VorbisCommentReader
- extends java.lang.Object
Create the VorbisCommentTag by reading from the raw packet data
This is in the same format whether encoded with Ogg or Flac
except the framing bit is only present when used within Ogg Vorbis
From the http://xiph.org/vorbis/doc/Vorbis_I_spec.html#vorbis-spec-comment
Read decodes the packet data using the following algorithm:
[vendor_length] = read an unsigned integer of 32 bits
[vendor_string] = read a UTF-8 vector as [vendor_length] octets
[user_comment_list_length] = read an unsigned integer of 32 bits
iterate [user_comment_list_length] times {
5) [length] = read an unsigned integer of 32 bits
6) this iteration's user comment = read a UTF-8 vector as [length] octets
}
[framing_bit] = read a single bit as boolean
if ( [framing_bit] unset or end-of-packet ) then ERROR
done.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
public static java.util.logging.Logger logger
FIELD_VENDOR_LENGTH_POS
public static final int FIELD_VENDOR_LENGTH_POS
- See Also:
- Constant Field Values
FIELD_VENDOR_STRING_POS
public static final int FIELD_VENDOR_STRING_POS
- See Also:
- Constant Field Values
FIELD_VENDOR_LENGTH_LENGTH
public static final int FIELD_VENDOR_LENGTH_LENGTH
- See Also:
- Constant Field Values
FIELD_USER_COMMENT_LIST_LENGTH
public static final int FIELD_USER_COMMENT_LIST_LENGTH
- See Also:
- Constant Field Values
FIELD_COMMENT_LENGTH_LENGTH
public static final int FIELD_COMMENT_LENGTH_LENGTH
- See Also:
- Constant Field Values
fix
private Fix fix
JAUDIOTAGGER_MAX_COMMENT_LENGTH
private static final int JAUDIOTAGGER_MAX_COMMENT_LENGTH
- max comment length that jaudiotagger can handle, this isnt the maximum column length allowed but we dont
dont allow comments larger than this because of problem with allocating memory (10MB shoudl be fine for all apps)
- See Also:
- Constant Field Values
VorbisCommentReader
public VorbisCommentReader()
VorbisCommentReader
public VorbisCommentReader(Fix fix)
read
public VorbisCommentTag read(byte[] rawdata,
boolean isFramingBit)
throws java.io.IOException,
CannotReadException
- Parameters:
rawdata
- isFramingBit
-
- Returns:
- logical representation of VorbisCommentTag
- Throws:
java.io.IOException
CannotReadException