public class OggVorbisTagReader extends Object
Modifier and Type | Class and Description |
---|---|
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)
|
Constructor and Description |
---|
OggVorbisTagReader() |
Modifier and Type | Method and Description |
---|---|
byte[] |
convertToVorbisSetupHeaderPacket(long fileOffsetOfStartingOggPage,
RandomAccessFile raf)
The Vorbis Setup Header may span multiple(2) pages, athough it doesnt normally.
|
byte[] |
convertToVorbisSetupHeaderPacketAndAdditionalPackets(long fileOffsetOfStartingOggPage,
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(RandomAccessFile raf)
Read the Logical VorbisComment Tag from the file
|
OggVorbisTagReader.OggVorbisHeaderSizes |
readOggVorbisHeaderSizes(RandomAccessFile raf)
Calculate the size of the packet data for the comment and setup headers
|
int |
readOggVorbisRawSize(RandomAccessFile raf)
Retrieve the Size of the VorbisComment packet including the oggvorbis header
|
byte[] |
readRawPacketData(RandomAccessFile raf)
Retrieve the raw VorbisComment packet data, does not include the OggVorbis header
|
public static Logger logger
public Tag read(RandomAccessFile raf) throws CannotReadException, IOException
Read the CommenyTag, within an OggVorbis file the VorbisCommentTag is mandatory
raf
- CannotReadException
IOException
public int readOggVorbisRawSize(RandomAccessFile raf) throws CannotReadException, IOException
raf
- CannotReadException
IOException
public byte[] readRawPacketData(RandomAccessFile raf) throws CannotReadException, IOException
raf
- CannotReadException
- if unable to find vorbiscomment headerIOException
public boolean isVorbisCommentHeader(byte[] headerData)
headerData
- public boolean isVorbisSetupHeader(byte[] headerData)
headerData
- public byte[] convertToVorbisSetupHeaderPacket(long fileOffsetOfStartingOggPage, RandomAccessFile raf) throws IOException, CannotReadException
fileOffsetOfStartingOggPage
- raf
- CannotReadException
IOException
public byte[] convertToVorbisSetupHeaderPacketAndAdditionalPackets(long fileOffsetOfStartingOggPage, RandomAccessFile raf) throws IOException, CannotReadException
fileOffsetOfStartingOggPage
- raf
- CannotReadException
IOException
public OggVorbisTagReader.OggVorbisHeaderSizes readOggVorbisHeaderSizes(RandomAccessFile raf) throws CannotReadException, IOException
raf
- CannotReadException
IOException
Copyright © 2005–2020 jthink.net. All rights reserved.