Package org.red5.io.webm
Class WebmWriter
- java.lang.Object
-
- org.red5.io.webm.WebmWriter
-
- All Implemented Interfaces:
Closeable,AutoCloseable,TagConsumer
public class WebmWriter extends Object implements Closeable, TagConsumer
Class able to write webm tags to file
-
-
Constructor Summary
Constructors Constructor Description WebmWriter(File file, boolean append)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Will close all opened resources and "finalize" the write processvoidconsume(Tag tag)Method will be called as soon as webm Tag is availablevoidwriteHeader()method to write webm header to the new filevoidwriteTag(Tag tag)will write tag bytesWritten counter will be increased by the number of bytes actually written
-
-
-
Constructor Detail
-
WebmWriter
public WebmWriter(File file, boolean append)
Constructor- Parameters:
file- - file the data need to written toappend- - iffalsethe file will be rewritten, iftruedata will be appended
-
-
Method Detail
-
writeHeader
public void writeHeader() throws IOException, ConverterExceptionmethod to write webm header to the new file- Throws:
IOException- - in case of IO errorsConverterException- - in case of conversion errors
-
writeTag
public void writeTag(Tag tag) throws IOException
will write tag bytesWritten counter will be increased by the number of bytes actually written- Parameters:
tag- - tag to be written- Throws:
IOException- - in case of any IO errors
-
close
public void close() throws IOExceptionWill close all opened resources and "finalize" the write process- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
consume
public void consume(Tag tag) throws IOException
Description copied from interface:TagConsumerMethod will be called as soon as webm Tag is available- Specified by:
consumein interfaceTagConsumer- Parameters:
tag- - tag to be processed- Throws:
IOException- - exception accured during processing- See Also:
TagConsumer.consume(org.red5.io.matroska.dtd.Tag)
-
-