public class OggVorbisTagReader
extends java.lang.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)
|
Modifier and Type | Field and Description |
---|---|
static java.util.logging.Logger |
logger |
private VorbisCommentReader |
vorbisCommentReader |
Constructor and Description |
---|
OggVorbisTagReader() |
Modifier and Type | Method and Description |
---|---|
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
|
public static java.util.logging.Logger logger
private VorbisCommentReader vorbisCommentReader
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 headerjava.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
Copyright © 2005-2013 java.net. All Rights Reserved.