Package org.red5.io
Interface ITagWriter
- All Known Implementing Classes:
FLVWriter
public interface ITagWriter
Writes tags to a file
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPostProcessor
(IPostProcessor postProcessor) Adds a post-process for execution once the instance completes.void
close()
Closes a Writerlong
Return the bytes writtengetFile()
Return the file that is written.int
Return the offsetvoid
Writes the header bytesboolean
writeStream
(byte[] b) Write a Stream to disk using bytesboolean
writeTag
(byte type, org.apache.mina.core.buffer.IoBuffer data) Write a Tag using bytesboolean
Writes 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:
true
on success,false
otherwise
-
writeTag
Write a Tag using bytes- Parameters:
type
- Tag typedata
- Byte data- Returns:
true
on success,false
otherwise- Throws:
IOException
- I/O exception
-
writeTag
Writes a Tag object- Parameters:
tag
- Tag to write- Returns:
true
on success,false
otherwise- Throws:
IOException
- I/O exception
-
addPostProcessor
Adds a post-process for execution once the instance completes.- Parameters:
postProcessor
- an implementation instance of IPostProcessor
-