|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecthu.netmind.ogg.PageFactory
public class PageFactory
This class creates pages for the physical ogg stream. By default, pages will be created to form an ideal page size of 4-8 kB, but this algorithm can be (and is advised to be) overidden, to implement custom paging functionality (eg.: coordinating with other logical streams to determine whether it is time to write pages).
| Constructor Summary | |
|---|---|
PageFactory(OggOutputStream oggStream)
Initialize the page factory with owner ogg stream. |
|
| Method Summary | |
|---|---|
void |
close()
Close this page factory. |
PagingAlgorithm |
getPagingAlgorithm()
|
int |
getSerial()
Get the serial number associated with this page factory. |
void |
setPagingAlgorithm(PagingAlgorithm pagingAlgorithm)
|
void |
writePacket(Packet packet)
This method is called by the logical stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PageFactory(OggOutputStream oggStream)
oggStream - The ogg stream this page factory will work into.| Method Detail |
|---|
public int getSerial()
public void writePacket(Packet packet)
throws java.io.IOException
packet - The packet to write.
java.io.IOException - If the ogg stream had an error, or packet could
not be included into current page.
public void close()
throws java.io.IOException
java.io.IOException - If the ogg stream throws an exception.public PagingAlgorithm getPagingAlgorithm()
public void setPagingAlgorithm(PagingAlgorithm pagingAlgorithm)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||