public class OggPacketWriter extends Object implements Closeable
Modifier | Constructor and Description |
---|---|
protected |
OggPacketWriter(OggFile parentFile,
int sid) |
Modifier and Type | Method and Description |
---|---|
void |
bufferPacket(OggPacket packet)
Buffers the given packet up ready for
writing to the stream, but doesn't
write it to disk yet.
|
void |
bufferPacket(OggPacket packet,
boolean flush)
Buffers the given packet up ready for
writing to the file, and then writes
it to the stream if indicated.
|
void |
close()
Writes all pending packets to the stream,
with the last one containing the End Of Stream
Flag, and then closes down.
|
void |
flush()
Writes all pending packets to the stream,
splitting across pages as needed.
|
long |
getCurrentGranulePosition() |
int |
getSid() |
int |
getSizePendingFlush()
Returns the number of bytes (excluding headers)
currently waiting to be written to disk.
|
void |
setGranulePosition(long position)
Sets the current granule position.
|
protected OggPacketWriter(OggFile parentFile, int sid)
public void setGranulePosition(long position)
public long getCurrentGranulePosition()
public int getSid()
public void bufferPacket(OggPacket packet)
public void bufferPacket(OggPacket packet, boolean flush) throws IOException
IOException
public int getSizePendingFlush()
public void flush() throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2015. All rights reserved.