|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gagravarr.ogg.OggPage
public class OggPage
Nested Class Summary | |
---|---|
protected class |
OggPage.OggPacketIterator
Returns a full OggPacket if it can, otherwise
just the OggPacketData if the rest of the
packet is in another OggPage |
Constructor Summary | |
---|---|
protected |
OggPage(InputStream inp)
InputStream should be positioned *just after* the OggS capture pattern. |
protected |
OggPage(int sid,
int seqNum)
|
Method Summary | |
---|---|
protected int |
addPacket(OggPacket packet,
int offset)
Adds as much of the packet's data as we can do. |
protected long |
getChecksum()
|
byte[] |
getData()
|
int |
getDataSize()
How big is the page, excluding headers? |
long |
getGranulePosition()
|
protected byte[] |
getHeader()
Gets the header, but with a blank CRC field |
protected int |
getNumLVs()
For unit testing only! |
OggPage.OggPacketIterator |
getPacketIterator()
|
OggPage.OggPacketIterator |
getPacketIterator(OggPacketData previousPart)
|
int |
getPageSize()
How big is the page, including headers? |
int |
getSequenceNumber()
|
int |
getSid()
|
boolean |
hasContinuation()
Is there a subsequent page containing the remainder of the packets? |
protected boolean |
hasSpaceFor(int bytes)
Does this Page have space for the given number of bytes? |
boolean |
isChecksumValid()
Is the checksum for the page valid? |
boolean |
isContinuation()
Is this carrying on the packets from a previous page? |
protected void |
setGranulePosition(long position)
|
protected void |
setIsContinuation()
|
protected void |
setIsEOS()
This should only ever be called by OggPacketWriter.close() ! |
String |
toString()
|
void |
writeHeader(OutputStream out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected OggPage(int sid, int seqNum)
protected OggPage(InputStream inp) throws IOException
IOException
Method Detail |
---|
protected int addPacket(OggPacket packet, int offset)
public boolean isChecksumValid()
protected long getChecksum()
protected boolean hasSpaceFor(int bytes)
public int getPageSize()
public int getDataSize()
public int getSid()
public int getSequenceNumber()
public long getGranulePosition()
public byte[] getData()
protected void setGranulePosition(long position)
public boolean hasContinuation()
public boolean isContinuation()
protected void setIsContinuation()
protected void setIsEOS()
OggPacketWriter.close()
!
protected int getNumLVs()
public void writeHeader(OutputStream out) throws IOException
IOException
protected byte[] getHeader()
public String toString()
toString
in class Object
public OggPage.OggPacketIterator getPacketIterator()
public OggPage.OggPacketIterator getPacketIterator(OggPacketData previousPart)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |