public class LogicalOggStreamImpl extends Object implements LogicalOggStream
FORMAT_FLAC, FORMAT_THEORA, FORMAT_UNKNOWN, FORMAT_VORBIS| Constructor and Description |
|---|
LogicalOggStreamImpl(PhysicalOggStream source,
int serialNumber) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGranulePosition(long granulePosition) |
void |
addPageNumberMapping(int physicalPageNumber) |
void |
checkFormat(OggPage page) |
void |
close()
Closes this stream.
|
String |
getFormat() |
long |
getMaximumGranulePosition()
This method does not work if the physical Ogg stream is not
seekable.
|
byte[] |
getNextOggPacket()
Note: To read from the stream, you must use either
this method or the method
getNextOggPage. |
OggPage |
getNextOggPage()
Note: To read from the stream, you must use either
this method or the method
getNextOggPacket. |
long |
getTime() |
boolean |
isOpen()
Checks if this stream is open for reading.
|
void |
reset()
Sets the stream's position to the beginning of the stream.
|
void |
setTime(long granulePosition)
This method is invoked on all logical streams when
calling the same method on the physical stream.
|
public LogicalOggStreamImpl(PhysicalOggStream source, int serialNumber)
public void addPageNumberMapping(int physicalPageNumber)
public void addGranulePosition(long granulePosition)
public void reset()
throws OggFormatException,
IOException
LogicalOggStreamreset in interface LogicalOggStreamOggFormatException - if the ogg stream is corruptedIOException - if some other IO error occurspublic OggPage getNextOggPage() throws EndOfOggStreamException, OggFormatException, IOException
LogicalOggStreamgetNextOggPacket.
Mixing calls to the two methods will cause data corruption.getNextOggPage in interface LogicalOggStreamOggFormatException - if the ogg stream is corruptedIOException - if some other IO error occursEndOfOggStreamExceptionLogicalOggStream.getNextOggPacket()public byte[] getNextOggPacket()
throws EndOfOggStreamException,
OggFormatException,
IOException
LogicalOggStreamgetNextOggPage.
Mixing calls to the two methods will cause data corruption.getNextOggPacket in interface LogicalOggStreamOggFormatException - if the ogg stream is corruptedIOException - if some other IO error occursEndOfOggStreamExceptionLogicalOggStream.getNextOggPage()public boolean isOpen()
LogicalOggStreamisOpen in interface LogicalOggStreamtrue if this stream is open for reading,
false otherwisepublic void close()
throws IOException
LogicalOggStreamclose in interface LogicalOggStreamIOException - if an IO error occurspublic long getMaximumGranulePosition()
LogicalOggStreamgetMaximumGranulePosition in interface LogicalOggStreampublic long getTime()
getTime in interface LogicalOggStreampublic void setTime(long granulePosition)
throws IOException
LogicalOggStreamsetTime in interface LogicalOggStreamIOException - if an IO error occursPhysicalOggStream.setTime(long)public void checkFormat(OggPage page)
public String getFormat()
getFormat in interface LogicalOggStreamLogicalOggStream.FORMAT_UNKNOWN,
LogicalOggStream.FORMAT_VORBIS,
LogicalOggStream.FORMAT_FLAC,
LogicalOggStream.FORMAT_THEORACopyright © 2017. All rights reserved.