|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jaudiotagger.audio.ogg.OggVorbisTagReader
public class OggVorbisTagReader
Read Vorbis Comment Tag within ogg
Vorbis is the audiostream within an ogg file, Vorbis uses VorbisComments as its tag
Nested Class Summary | |
---|---|
static class |
OggVorbisTagReader.OggVorbisHeaderSizes
Find the length of the raw packet data and the start position of the ogg page header they start in for the two OggVorbisHeader we need to know about when writing data (sizes included vorbis header) |
Field Summary | |
---|---|
static java.util.logging.Logger |
logger
|
private VorbisCommentReader |
vorbisCommentReader
|
Constructor Summary | |
---|---|
OggVorbisTagReader()
|
|
OggVorbisTagReader(Fix fix)
|
Method Summary | |
---|---|
private byte[] |
convertToVorbisCommentPacket(OggPageHeader startVorbisCommentPage,
java.io.RandomAccessFile raf)
The Vorbis Comment may span multiple pages so we we need to identify the pages they contain and then extract the packet data from the pages |
byte[] |
convertToVorbisSetupHeaderPacket(long fileOffsetOfStartingOggPage,
java.io.RandomAccessFile raf)
The Vorbis Setup Header may span multiple(2) pages, athough it doesnt normally. |
byte[] |
convertToVorbisSetupHeaderPacketAndAdditionalPackets(long fileOffsetOfStartingOggPage,
java.io.RandomAccessFile raf)
The Vorbis Setup Header may span multiple(2) pages, athough it doesnt normally. |
boolean |
isVorbisCommentHeader(byte[] headerData)
Is this a Vorbis Comment header, check Note this check only applies to Vorbis Comments embedded within an OggVorbis File which is why within here |
boolean |
isVorbisSetupHeader(byte[] headerData)
Is this a Vorbis SetupHeader check |
Tag |
read(java.io.RandomAccessFile raf)
Read the Logical VorbisComment Tag from the file |
OggVorbisTagReader.OggVorbisHeaderSizes |
readOggVorbisHeaderSizes(java.io.RandomAccessFile raf)
Calculate the size of the packet data for the comment and setup headers |
int |
readOggVorbisRawSize(java.io.RandomAccessFile raf)
Retrieve the Size of the VorbisComment packet including the oggvorbis header |
byte[] |
readRawPacketData(java.io.RandomAccessFile raf)
Retrieve the raw VorbisComment packet data, does not include the OggVorbis header |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.util.logging.Logger logger
private VorbisCommentReader vorbisCommentReader
Constructor Detail |
---|
public OggVorbisTagReader()
public OggVorbisTagReader(Fix fix)
Method Detail |
---|
public Tag read(java.io.RandomAccessFile raf) throws CannotReadException, java.io.IOException
Read the CommenyTag, within an OggVorbis file the VorbisCommentTag is mandatory
raf
-
CannotReadException
java.io.IOException
public int readOggVorbisRawSize(java.io.RandomAccessFile raf) throws CannotReadException, java.io.IOException
raf
-
CannotReadException
java.io.IOException
public byte[] readRawPacketData(java.io.RandomAccessFile raf) throws CannotReadException, java.io.IOException
raf
-
CannotReadException
- if unable to find vorbiscomment header
java.io.IOException
public boolean isVorbisCommentHeader(byte[] headerData)
headerData
-
public boolean isVorbisSetupHeader(byte[] headerData)
headerData
-
private byte[] convertToVorbisCommentPacket(OggPageHeader startVorbisCommentPage, java.io.RandomAccessFile raf) throws java.io.IOException, CannotReadException
startVorbisCommentPage
- raf
-
CannotReadException
java.io.IOException
public byte[] convertToVorbisSetupHeaderPacket(long fileOffsetOfStartingOggPage, java.io.RandomAccessFile raf) throws java.io.IOException, CannotReadException
fileOffsetOfStartingOggPage
- raf
-
CannotReadException
java.io.IOException
public byte[] convertToVorbisSetupHeaderPacketAndAdditionalPackets(long fileOffsetOfStartingOggPage, java.io.RandomAccessFile raf) throws java.io.IOException, CannotReadException
fileOffsetOfStartingOggPage
- raf
-
CannotReadException
java.io.IOException
public OggVorbisTagReader.OggVorbisHeaderSizes readOggVorbisHeaderSizes(java.io.RandomAccessFile raf) throws CannotReadException, java.io.IOException
raf
-
CannotReadException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |