|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.red5.io.flv.impl.FLVWriter
public class FLVWriter
A Writer is used to write the contents of a FLV file
| Constructor Summary | |
|---|---|
FLVWriter(File file,
boolean append)
Creates writer implementation with given file and last tag FLV.java uses this constructor so we have access to the file object |
|
FLVWriter(FileOutputStream fos,
boolean append)
Creates writer implementation with given file output stream and last tag |
|
| Method Summary | |
|---|---|
void |
close()
Closes a Writer |
long |
getBytesWritten()
Return the bytes written |
IStreamableFile |
getFile()
Return the file that is written. |
int |
getOffset()
Return the offset |
void |
setFLV(IFLV flv)
Setter for FLV object |
void |
setOffset(int offset)
Setter for offset |
void |
writeHeader()
Writes the header bytes |
boolean |
writeStream(byte[] b)
Write a Stream to disk using bytes |
boolean |
writeTag(byte type,
IoBuffer data)
Write a Tag using bytes |
boolean |
writeTag(ITag tag)
Writes a Tag object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FLVWriter(FileOutputStream fos,
boolean append)
fos - File output streamappend - true if append to existing file
public FLVWriter(File file,
boolean append)
file - File output streamappend - true if append to existing file| Method Detail |
|---|
public void writeHeader()
throws IOException
writeHeader in interface ITagWriterIOException - Any I/O exceptionpublic IStreamableFile getFile()
getFile in interface ITagWriterpublic void setFLV(IFLV flv)
flv - FLV sourcepublic int getOffset()
getOffset in interface ITagWriterpublic void setOffset(int offset)
offset - Value to set for offsetpublic long getBytesWritten()
getBytesWritten in interface ITagWriter
public boolean writeTag(ITag tag)
throws IOException
writeTag in interface ITagWritertag - Tag to write
true on success, false otherwise
IOException - I/O exception
public boolean writeTag(byte type,
IoBuffer data)
throws IOException
writeTag in interface ITagWritertype - Tag typedata - Byte data
true on success, false otherwise
IOException - I/O exceptionpublic void close()
close in interface ITagWriterpublic boolean writeStream(byte[] b)
writeStream in interface ITagWriterb - Array of bytes to write
true on success, false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||