Package org.red5.io
Interface ITagWriter
-
- All Known Implementing Classes:
FLVWriter
public interface ITagWriterWrites tags to a file
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPostProcessor(IPostProcessor postProcessor)Adds a post-process for execution once the instance completes.voidclose()Closes a WriterlonggetBytesWritten()Return the bytes writtenIStreamableFilegetFile()Return the file that is written.intgetOffset()Return the offsetvoidwriteHeader()Writes 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 bytesbooleanwriteTag(ITag tag)Writes a Tag object
-
-
-
Method Detail
-
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
void writeHeader() throws IOExceptionWrites 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
boolean writeTag(byte type, org.apache.mina.core.buffer.IoBuffer data) throws IOExceptionWrite a Tag using bytes- Parameters:
type- Tag typedata- Byte data- Returns:
trueon success,falseotherwise- Throws:
IOException- I/O exception
-
writeTag
boolean writeTag(ITag tag) throws IOException
Writes a Tag object- Parameters:
tag- Tag to write- Returns:
trueon success,falseotherwise- Throws:
IOException- I/O exception
-
addPostProcessor
void addPostProcessor(IPostProcessor postProcessor)
Adds a post-process for execution once the instance completes.- Parameters:
postProcessor- an implementation instance of IPostProcessor
-
-