org.tritonus.lowlevel.pogg
Class Page

java.lang.Object
  extended by org.tritonus.lowlevel.pogg.Page

public class Page
extends java.lang.Object

Wrapper for ogg_page.


Constructor Summary
Page()
           
 
Method Summary
 void free()
          Dummy method to make it compatible with native vorbis Page class
 byte[] getBody()
          Obtain the body of the page.
 long getGranulePos()
          Obtains the granule position property of the page.
 byte[] getHeader()
          Obtain the header of the page.
 int getPackets()
          Calls ogg_page_packets().
 int getPageNo()
          Calls ogg_page_pageno().
 int getSerialNo()
          Obtain the serial number of the stream the page belongs to.
 int getVersion()
          Obtains the stream structure version.
 boolean isBos()
          Returns the "begin of stream" property of the page.
 boolean isContinued()
          Returns if the page is continued.
 boolean isEos()
          Returns the "end of stream" property of the page.
 void setChecksum()
          Calculate and set the checksum of the page.
 void setData(byte[] abHeader, int nHeaderOffset, int nHeaderLength, byte[] abBody, int nBodyOffset, int nBodyLength)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Page

public Page()
Method Detail

free

public void free()
Dummy method to make it compatible with native vorbis Page class


getVersion

public int getVersion()
Obtains the stream structure version. This method returns the stream structure version this page is encoded in. For the current ogg version, this is always zero.

Returns:
the stream structure version

isContinued

public boolean isContinued()
Returns if the page is continued. This method returns whether this page starts with a packet that is continued from the previous page.

Returns:
true if the page starts with a continued packet.

getPackets

public int getPackets()
Calls ogg_page_packets().


isBos

public boolean isBos()
Returns the "begin of stream" property of the page. This method returns true if the page is the first page of the stream.

Returns:
true if the page is the first in the stream, false otherwise

isEos

public boolean isEos()
Returns the "end of stream" property of the page. This method returns true if the page is the last page of the stream.

Returns:
true if the page is the last in the stream, false otherwise

getGranulePos

public long getGranulePos()
Obtains the granule position property of the page. This method returns the granule position of the page as stored in the page header.

Returns:
the granule position of the page

getSerialNo

public int getSerialNo()
Obtain the serial number of the stream the page belongs to. This method returns the stream serial number stored in the page header.

Returns:
the stream serial number

getPageNo

public int getPageNo()
Calls ogg_page_pageno().


setChecksum

public void setChecksum()
Calculate and set the checksum of the page.


getHeader

public byte[] getHeader()
Obtain the header of the page.


getBody

public byte[] getBody()
Obtain the body of the page.


setData

public void setData(byte[] abHeader,
                    int nHeaderOffset,
                    int nHeaderLength,
                    byte[] abBody,
                    int nBodyOffset,
                    int nBodyLength)