public interface IRandomAccessWriter2
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Close the media asset
|
boolean |
exists() |
Does the media asset exist
|
String |
getBasePath() |
Get the basePath for the random access reader
|
int |
getDirecton() |
Get the current direction hint for the random access reader.
|
long |
getFilePointer() |
Get the current byte location in the media asset
|
String |
getMediaExtension() |
Get the media extension
|
String |
getMediaName() |
Get the media name
|
String |
getPath() |
Get the unique path to the media asset item
|
void |
init(IApplicationInstance appInstance,
IMediaStream stream,
String basePath,
String mediaName,
String mediaExtension) |
Intialize RandomAccessReader
|
boolean |
isOpen() |
Is the media asset open
|
long |
lastModified() |
Return the lastModified date (same format as File.lastModified)
|
long |
length() |
Get the media asset length in bytes
|
void |
open() |
Open the media asset
|
void |
seek(long pos) |
Seek to a position in the media asset
|
void |
setDirecton(int directon) |
Set the current direction hint
|
void |
write(byte[] buf,
int off,
int len) |
Writes
len bytes from the specified byte array
starting at offset off to this file. |
static final int FORWARD
static final int REVERSE
void close()
throws java.io.IOException
java.io.IOExceptionboolean exists()
String getBasePath()
int getDirecton()
long getFilePointer()
String getMediaExtension()
String getMediaName()
String getPath()
void init(IApplicationInstance appInstance, IMediaStream stream, String basePath, String mediaName, String mediaExtension)
appInstance - application instancestream - parent stream if one existsbasePath - basePath for IApplicationInstancemediaName - media namemediaExtension - media extension from mediaReadersboolean isOpen()
long lastModified()
long length()
void open() throws java.io.IOException
java.io.IOExceptionvoid seek(long pos)
pos - position to seek tovoid setDirecton(int directon)
directon - current direction hint for the random access readervoid write(byte[] buf,
int off,
int len)
len bytes from the specified byte array
starting at offset off to this file.buf - the data.off - the start offset in the data.len - the number of bytes to write.java.io.IOException - if an I/O error occurs.