Package org.red5.io
Interface ITagWriter
- All Known Implementing Classes:
FLVWriter
public interface ITagWriter
Writes tags to a file
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddPostProcessor(IPostProcessor postProcessor) Adds a post-process for execution once the instance completes.voidclose()Closes a WriterlongReturn the bytes writtengetFile()Return the file that is written.intReturn the offsetvoidWrites the header bytesbooleanwriteStream(byte[] b) Write a Stream to disk using bytesbooleanwriteTag(byte type, org.apache.mina.core.buffer.IoBuffer data) Write a Tag using bytesbooleanWrites a Tag object
-
Method Details
-
close
void close()Closes a Writer -
getBytesWritten
long getBytesWritten()Return the bytes written- Returns:
- Number of bytes written
-
getFile
IStreamableFile getFile()Return the file that is written.- Returns:
- the File to be written
-
getOffset
int getOffset()Return the offset- Returns:
- Offset value
-
writeHeader
Writes the header bytes- Throws:
IOException- I/O exception
-
writeStream
boolean writeStream(byte[] b) Write a Stream to disk using bytes- Parameters:
b- Array of bytes to write- Returns:
trueon success,falseotherwise
-
writeTag
Write a Tag using bytes- Parameters:
type- Tag typedata- Byte data- Returns:
trueon success,falseotherwise- Throws:
IOException- I/O exception
-
writeTag
Writes a Tag object- Parameters:
tag- Tag to write- Returns:
trueon success,falseotherwise- Throws:
IOException- I/O exception
-
addPostProcessor
Adds a post-process for execution once the instance completes.- Parameters:
postProcessor- an implementation instance of IPostProcessor
-