public class VorbisCommentReader
extends java.lang.Object
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.
Modifier and Type | Field and Description |
---|---|
static int |
FIELD_COMMENT_LENGTH_LENGTH |
static int |
FIELD_USER_COMMENT_LIST_LENGTH |
static int |
FIELD_VENDOR_LENGTH_LENGTH |
static int |
FIELD_VENDOR_LENGTH_POS |
static int |
FIELD_VENDOR_STRING_POS |
private static 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)
|
static java.util.logging.Logger |
logger |
Constructor and Description |
---|
VorbisCommentReader() |
Modifier and Type | Method and Description |
---|---|
VorbisCommentTag |
read(byte[] rawdata,
boolean isFramingBit) |
public static java.util.logging.Logger logger
public static final int FIELD_VENDOR_LENGTH_POS
public static final int FIELD_VENDOR_STRING_POS
public static final int FIELD_VENDOR_LENGTH_LENGTH
public static final int FIELD_USER_COMMENT_LIST_LENGTH
public static final int FIELD_COMMENT_LENGTH_LENGTH
private static final int JAUDIOTAGGER_MAX_COMMENT_LENGTH
public VorbisCommentTag read(byte[] rawdata, boolean isFramingBit) throws java.io.IOException, CannotReadException
rawdata
- isFramingBit
- java.io.IOException
CannotReadException
Copyright © 2005-2013 java.net. All Rights Reserved.