net.sourceforge.dvb.projectx.xinput.file
Class XInputDirectoryImpl

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

public class XInputDirectoryImpl
extends java.lang.Object
implements XInputDirectoryIF


Constructor Summary
XInputDirectoryImpl(java.io.File aFile)
          Create a XInputDirectory of type DirType.FILE_DIR.
XInputDirectoryImpl(java.lang.String aFileIdentifier)
          Create a XInputDirectory of type DirType.FILE_DIR.
 
Method Summary
 java.lang.String getDirectory()
          Get path of directory
 DirType getDirType()
           
 XInputFile[] getFiles()
          Get files in the directory.
 java.lang.String getLog()
          Get log of communication with ftp server.
 java.lang.String getPassword()
          Get password for the ftp server
 java.lang.String getPort()
          Get port of the ftp server
 java.lang.String getServer()
          Get name or ip address of the ftp server
 java.lang.String getTestMsg()
          Get result message after test().
 java.lang.String getUser()
          Get user for the ftp server
 boolean test()
          Test if directory data is valid.
 java.lang.String toString()
          Get String representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XInputDirectoryImpl

public XInputDirectoryImpl(java.io.File aFile)
Create a XInputDirectory of type DirType.FILE_DIR.
Parameters:
aFile - Directory data to use
Throws:
java.lang.IllegalArgumentException - If aFile is not a directory

XInputDirectoryImpl

public XInputDirectoryImpl(java.lang.String aFileIdentifier)
Create a XInputDirectory of type DirType.FILE_DIR.
Parameters:
aFileIdentifier - Directory name
Throws:
java.lang.IllegalArgumentException - If aFile is not a directory
Method Detail

toString

public java.lang.String toString()
Get String representation of the object.
Specified by:
toString in interface XInputDirectoryIF
Overrides:
toString in class java.lang.Object
Returns:
String representation of the object

getDirectory

public java.lang.String getDirectory()
Get path of directory
Specified by:
getDirectory in interface XInputDirectoryIF
Returns:
Path of directory

getPassword

public java.lang.String getPassword()
Get password for the ftp server
Specified by:
getPassword in interface XInputDirectoryIF
Returns:
Password for the ftp server
Throws:
java.lang.IllegalStateException - If file type of object is not DirType.FTP_DIR

getServer

public java.lang.String getServer()
Get name or ip address of the ftp server
Specified by:
getServer in interface XInputDirectoryIF
Returns:
Name or ip address of the ftp server
Throws:
java.lang.IllegalStateException - If file type of object is not DirType.FTP_DIR

getPort

public java.lang.String getPort()
Get port of the ftp server
Specified by:
getPort in interface XInputDirectoryIF
Returns:
port of the ftp server
Throws:
java.lang.IllegalStateException - If file type of object is not DirType.FTP_DIR

getUser

public java.lang.String getUser()
Get user for the ftp server
Specified by:
getUser in interface XInputDirectoryIF
Returns:
User for the ftp server
Throws:
java.lang.IllegalStateException - If file type of object is not DirType.FTP_DIR

getLog

public java.lang.String getLog()
Get log of communication with ftp server.
Specified by:
getLog in interface XInputDirectoryIF
Returns:
Log of communication with ftp server
Throws:
java.lang.IllegalStateException - If file type of object is not DirType.FTP_DIR

getFiles

public XInputFile[] getFiles()
Get files in the directory.
Specified by:
getFiles in interface XInputDirectoryIF
Returns:
files in the directory

test

public boolean test()
Test if directory data is valid.
Specified by:
test in interface XInputDirectoryIF
Returns:
Test successful or not

getTestMsg

public java.lang.String getTestMsg()
Get result message after test().
Specified by:
getTestMsg in interface XInputDirectoryIF
Returns:
result message after test()

getDirType

public DirType getDirType()
Specified by:
getDirType in interface XInputDirectoryIF
Returns:
Type of XInputDirectory