net.sourceforge.dvb.projectx.xinput
Class XInputFile

java.lang.Object
  |
  +--net.sourceforge.dvb.projectx.xinput.XInputFile

public class XInputFile
extends java.lang.Object
implements XInputFileIF


Constructor Summary
XInputFile(java.lang.Object aVO)
           
 
Method Summary
 boolean equals(java.lang.Object aObj)
           
 boolean exists()
          Checks if file exists
 java.lang.Object getConstructorParameter()
           
 FileType getFileType()
          Gets the type of this XInputFile implementation.
 XInputFileIF getImpl()
           
 java.io.InputStream getInputStream()
          Get input stream from the file. close() on stream closes XInputFile, too.
 java.io.InputStream getInputStream(long start_position)
          Get input stream from the file. close() on stream closes XInputFile, too.
 java.lang.String getName()
          Get Name of file
 XInputFile getNewInstance()
           
 java.lang.String getParent()
          Get Path of parent
 StreamInfo getStreamInfo()
           
 java.lang.String getUrl()
          Get url representation of the object.
 int hashCode()
           
 long lastModified()
          Time in milliseconds from the epoch.
 long length()
          Length of file in bytes.
 void randomAccessClose()
           
 long randomAccessGetFilePointer()
           
 void randomAccessOpen(java.lang.String aMode)
          Opens XInputFile for random access
 int randomAccessRead()
           
 int randomAccessRead(byte[] aBuffer)
           
 int randomAccessRead(byte[] aBuffer, int aOffset, int aLength)
           
 java.lang.String randomAccessReadLine()
           
 long randomAccessReadLong()
           
 void randomAccessSeek(long aPosition)
           
 void randomAccessSingleRead(byte[] aBuffer, long aPosition)
          Convinience method for a single random read access to a input file.
 void randomAccessWrite(byte[] aBuffer)
           
 boolean rename()
          rename
 void setConstructorParameter(java.lang.Object obj)
           
 boolean setLastModified()
          set Time in milliseconds from the epoch.
 void setStreamInfo(StreamInfo _streamInfo)
           
 java.lang.String toString()
          Get String representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XInputFile

public XInputFile(java.lang.Object aVO)
Method Detail

getNewInstance

public XInputFile getNewInstance()

setConstructorParameter

public void setConstructorParameter(java.lang.Object obj)
Specified by:
setConstructorParameter in interface XInputFileIF

getConstructorParameter

public java.lang.Object getConstructorParameter()
Specified by:
getConstructorParameter in interface XInputFileIF

exists

public boolean exists()
Description copied from interface: XInputFileIF
Checks if file exists
Specified by:
exists in interface XInputFileIF
Returns:
 

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.FileNotFoundException,
                                          java.net.MalformedURLException,
                                          java.io.IOException
Description copied from interface: XInputFileIF
Get input stream from the file. close() on stream closes XInputFile, too.
Specified by:
getInputStream in interface XInputFileIF
Returns:
@throws FileNotFoundException
Throws:
java.net.MalformedURLException -  
java.io.IOException -  

getInputStream

public java.io.InputStream getInputStream(long start_position)
                                   throws java.io.FileNotFoundException,
                                          java.net.MalformedURLException,
                                          java.io.IOException
Description copied from interface: XInputFileIF
Get input stream from the file. close() on stream closes XInputFile, too.
Specified by:
getInputStream in interface XInputFileIF
Returns:
@throws FileNotFoundException
Throws:
java.net.MalformedURLException -  
java.io.IOException -  

getName

public java.lang.String getName()
Description copied from interface: XInputFileIF
Get Name of file
Specified by:
getName in interface XInputFileIF
Returns:
 

getParent

public java.lang.String getParent()
Description copied from interface: XInputFileIF
Get Path of parent
Specified by:
getParent in interface XInputFileIF
Returns:
 

getUrl

public java.lang.String getUrl()
Description copied from interface: XInputFileIF
Get url representation of the object.
Specified by:
getUrl in interface XInputFileIF
Returns:
 

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

lastModified

public long lastModified()
Description copied from interface: XInputFileIF
Time in milliseconds from the epoch.
Specified by:
lastModified in interface XInputFileIF
Returns:
 

setLastModified

public boolean setLastModified()
Description copied from interface: XInputFileIF
set Time in milliseconds from the epoch.
Specified by:
setLastModified in interface XInputFileIF
Returns:
 

length

public long length()
Description copied from interface: XInputFileIF
Length of file in bytes.
Specified by:
length in interface XInputFileIF
Returns:
 

rename

public boolean rename()
               throws java.io.IOException
rename
Specified by:
rename in interface XInputFileIF
Returns:
 

randomAccessClose

public void randomAccessClose()
                       throws java.io.IOException
Specified by:
randomAccessClose in interface XInputFileIF
Throws:
java.io.IOException -  

randomAccessOpen

public void randomAccessOpen(java.lang.String aMode)
                      throws java.io.IOException
Description copied from interface: XInputFileIF
Opens XInputFile for random access
Specified by:
randomAccessOpen in interface XInputFileIF
Parameters:
aMode -  
Throws:
java.io.IOException -  

randomAccessRead

public int randomAccessRead()
                     throws java.io.IOException
Specified by:
randomAccessRead in interface XInputFileIF
Returns:
@throws IOException

randomAccessRead

public int randomAccessRead(byte[] aBuffer)
                     throws java.io.IOException
Specified by:
randomAccessRead in interface XInputFileIF
Parameters:
aBuffer -  
Returns:
@throws IOException

randomAccessRead

public int randomAccessRead(byte[] aBuffer,
                            int aOffset,
                            int aLength)
                     throws java.io.IOException
Specified by:
randomAccessRead in interface XInputFileIF
Parameters:
aBuffer -  
aOffset -  
aLength -  
Returns:
@throws IOException

randomAccessReadLine

public java.lang.String randomAccessReadLine()
                                      throws java.io.IOException
Specified by:
randomAccessReadLine in interface XInputFileIF
Returns:
Read line
Throws:
java.io.IOException -  

randomAccessSeek

public void randomAccessSeek(long aPosition)
                      throws java.io.IOException
Specified by:
randomAccessSeek in interface XInputFileIF
Parameters:
aPosition -  
Throws:
java.io.IOException -  

randomAccessGetFilePointer

public long randomAccessGetFilePointer()
                                throws java.io.IOException
Specified by:
randomAccessGetFilePointer in interface XInputFileIF
Returns:
@throws IOException

randomAccessSingleRead

public void randomAccessSingleRead(byte[] aBuffer,
                                   long aPosition)
                            throws java.io.IOException
Description copied from interface: XInputFileIF
Convinience method for a single random read access to a input file. The file is opened before and closed after read.
Specified by:
randomAccessSingleRead in interface XInputFileIF
Parameters:
aBuffer -  
aPosition -  
Throws:
java.io.IOException -  

randomAccessWrite

public void randomAccessWrite(byte[] aBuffer)
                       throws java.io.IOException
Specified by:
randomAccessWrite in interface XInputFileIF
Parameters:
aBuffer -  
Throws:
java.io.IOException -  

randomAccessReadLong

public long randomAccessReadLong()
                          throws java.io.IOException
Specified by:
randomAccessReadLong in interface XInputFileIF
Returns:
@throws IOException

equals

public boolean equals(java.lang.Object aObj)
Overrides:
equals in class java.lang.Object

getFileType

public FileType getFileType()
Description copied from interface: XInputFileIF
Gets the type of this XInputFile implementation.
Specified by:
getFileType in interface XInputFileIF
Tags copied from interface: XInputFileIF
Returns:
FileType

toString

public java.lang.String toString()
Description copied from interface: XInputFileIF
Get String representation of the object.
Specified by:
toString in interface XInputFileIF
Overrides:
toString in class java.lang.Object
Tags copied from interface: XInputFileIF
Returns:
String representation of the object

getImpl

public XInputFileIF getImpl()

setStreamInfo

public void setStreamInfo(StreamInfo _streamInfo)
Specified by:
setStreamInfo in interface XInputFileIF

getStreamInfo

public StreamInfo getStreamInfo()
Specified by:
getStreamInfo in interface XInputFileIF