public class OggFile extends Object implements Closeable
Constructor and Description |
---|
OggFile(InputStream input)
Opens a file for reading in
blocking (non event) mode.
|
OggFile(InputStream input,
OggStreamListener listener)
Opens a file for reading in non-blocking
(event) mode.
|
OggFile(OutputStream output)
Opens a file for writing.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes our streams.
|
OggPacketReader |
getPacketReader()
Returns a reader that will allow you to read packets
from the file, across all Logical Bit Streams,
in the order that they occur.
|
OggPacketWriter |
getPacketWriter()
Creates a new Logical Bit Stream in the file,
and returns a Writer for putting data
into it.
|
OggPacketWriter |
getPacketWriter(int sid)
Creates a new Logical Bit Stream in the file,
and returns a Writer for putting data
into it.
|
protected int |
getUnusedSerialNumber()
Returns a random, but previously un-used serial
number for use by a new stream
|
protected void |
writePages(OggPage[] pages)
Writes a (possibly series) of pages to the
stream in one go.
|
public OggFile(OutputStream output)
getPacketWriter()
to
begin writing your data.public OggFile(InputStream input)
getPacketReader()
to
begin reading the file.public OggFile(InputStream input, OggStreamListener listener) throws IOException
IOException
public void close() throws IOException
OggPacketWriter
instances
first!close
in interface Closeable
close
in interface AutoCloseable
IOException
public OggPacketReader getPacketReader()
public OggPacketWriter getPacketWriter()
public OggPacketWriter getPacketWriter(int sid)
protected void writePages(OggPage[] pages) throws IOException
IOException
protected int getUnusedSerialNumber()
Copyright © 2015. All rights reserved.