Methods Summary |
---|
protected org.jaudiotagger.audio.generic.GenericAudioHeader | getEncodingInfo(java.io.RandomAccessFile raf)
return ir.read(raf);
|
protected org.jaudiotagger.tag.Tag | getTag(java.io.RandomAccessFile raf)
return vtr.read(raf);
|
public org.jaudiotagger.audio.ogg.util.OggPageHeader | readOggPageHeader(java.io.RandomAccessFile raf, int count)Return count Ogg Page header, count starts from zero
count=0; should return PageHeader that contains Vorbis Identification Header
count=1; should return Pageheader that contains VorbisComment and possibly SetupHeader
count>=2; should return PageHeader containing remaining VorbisComment,SetupHeader and/or Audio
OggPageHeader pageHeader = OggPageHeader.read(raf);
while (count > 0)
{
raf.seek(raf.getFilePointer() + pageHeader.getPageLength());
pageHeader = OggPageHeader.read(raf);
count--;
}
return pageHeader;
|
public void | shortSummarizeOggPageHeaders(java.io.File oggFile)Summarizes the first five pages, normally all we are interested in
RandomAccessFile raf = new RandomAccessFile(oggFile, "r");
int i = 0;
while (raf.getFilePointer() < raf.length())
{
System.out.println("pageHeader starts at absolute file position:" + raf.getFilePointer());
OggPageHeader pageHeader = OggPageHeader.read(raf);
System.out.println("pageHeader finishes at absolute file position:" + raf.getFilePointer());
System.out.println(pageHeader + "\n");
raf.seek(raf.getFilePointer() + pageHeader.getPageLength());
i++;
if(i>=5)
{
break;
}
}
System.out.println("Raf File Pointer at:" + raf.getFilePointer() + "File Size is:" + raf.length());
raf.close();
|
public void | summarizeOggPageHeaders(java.io.File oggFile)Summarize all the ogg headers in a file
A useful utility function
RandomAccessFile raf = new RandomAccessFile(oggFile, "r");
while (raf.getFilePointer() < raf.length())
{
System.out.println("pageHeader starts at absolute file position:" + raf.getFilePointer());
OggPageHeader pageHeader = OggPageHeader.read(raf);
System.out.println("pageHeader finishes at absolute file position:" + raf.getFilePointer());
System.out.println(pageHeader + "\n");
raf.seek(raf.getFilePointer() + pageHeader.getPageLength());
}
System.out.println("Raf File Pointer at:" + raf.getFilePointer() + "File Size is:" + raf.length());
raf.close();
|