public class VorbisCommentReader extends 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 |
static Logger |
logger |
Constructor and Description |
---|
VorbisCommentReader() |
Modifier and Type | Method and Description |
---|---|
VorbisCommentTag |
read(byte[] rawdata,
boolean isFramingBit,
Path path) |
public static 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
public VorbisCommentTag read(byte[] rawdata, boolean isFramingBit, Path path) throws IOException, CannotReadException
rawdata
- isFramingBit
- path
- IOException
CannotReadException
Copyright © 2005–2020 jthink.net. All rights reserved.