Package com.wowza.io
Interface IRandomAccessWriter2
- 
 public interface IRandomAccessWriter2
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close the media assetbooleanexists()Does the media asset existStringgetBasePath()Get the basePath for the random access readerintgetDirecton()Get the current direction hint for the random access reader.longgetFilePointer()Get the current byte location in the media assetStringgetMediaExtension()Get the media extensionStringgetMediaName()Get the media nameStringgetPath()Get the unique path to the media asset itemvoidinit(IApplicationInstance appInstance, IMediaStream stream, String basePath, String mediaName, String mediaExtension)Intialize RandomAccessReaderbooleanisOpen()Is the media asset openlonglastModified()Return the lastModified date (same format as File.lastModified)longlength()Get the media asset length in bytesvoidopen()Open the media assetvoidseek(long pos)Seek to a position in the media assetvoidsetDirecton(int directon)Set the current direction hintvoidwrite(byte[] buf, int off, int len)Writeslenbytes from the specified byte array starting at offsetoffto this file.
 
- 
- 
- 
Field Detail- 
FORWARDstatic final int FORWARD - See Also:
- Constant Field Values
 
 - 
REVERSEstatic final int REVERSE - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
initvoid init(IApplicationInstance appInstance, IMediaStream stream, String basePath, String mediaName, String mediaExtension) Intialize RandomAccessReader- Parameters:
- appInstance- application instance
- stream- parent stream if one exists
- basePath- basePath for IApplicationInstance
- mediaName- media name
- mediaExtension- media extension from mediaReaders
 
 - 
openvoid open() throws java.io.IOException Open the media asset- Throws:
- java.io.IOException
 
 - 
closevoid close() throws java.io.IOExceptionClose the media asset- Throws:
- java.io.IOException
 
 - 
isOpenboolean isOpen() Is the media asset open- Returns:
- true if media asset is open
 
 - 
getFilePointerlong getFilePointer() Get the current byte location in the media asset- Returns:
- current byte location in the media asset
 
 - 
seekvoid seek(long pos) Seek to a position in the media asset- Parameters:
- pos- position to seek to
 
 - 
writevoid write(byte[] buf, int off, int len)Writeslenbytes from the specified byte array starting at offsetoffto this file.- Parameters:
- buf- the data.
- off- the start offset in the data.
- len- the number of bytes to write.
- Throws:
- java.io.IOException- if an I/O error occurs.
 
 - 
getDirectonint getDirecton() Get the current direction hint for the random access reader. The underlying system will call setDirection to hint at the current direction the media assets is being read.- Returns:
- current direction hint for the random access reader
 
 - 
setDirectonvoid setDirecton(int directon) Set the current direction hint- Parameters:
- directon- current direction hint for the random access reader
 
 - 
getBasePathString getBasePath() Get the basePath for the random access reader- Returns:
- basePath for the random access reader
 
 - 
getMediaNameString getMediaName() Get the media name- Returns:
- media name
 
 - 
getMediaExtensionString getMediaExtension() Get the media extension- Returns:
- media extension
 
 - 
existsboolean exists() Does the media asset exist- Returns:
- true if media assets exists
 
 - 
lastModifiedlong lastModified() Return the lastModified date (same format as File.lastModified)- Returns:
- lastModified date (same format as File.lastModified)
 
 - 
lengthlong length() Get the media asset length in bytes- Returns:
- media asset length in bytes
 
 - 
getPathString getPath() Get the unique path to the media asset item- Returns:
- unique path to the media asset item
 
 
- 
 
-