public class OggPage extends Object
Modifier and Type | Class and Description |
---|---|
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 |
Modifier | Constructor and Description |
---|---|
protected |
OggPage(InputStream inp)
InputStream should be positioned *just after*
the OggS capture pattern.
|
protected |
OggPage(int sid,
int seqNum) |
Modifier and Type | Method and Description |
---|---|
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) |
protected OggPage(int sid, int seqNum)
protected OggPage(InputStream inp) throws IOException
IOException
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 OggPage.OggPacketIterator getPacketIterator()
public OggPage.OggPacketIterator getPacketIterator(OggPacketData previousPart)
Copyright © 2015. All rights reserved.