com.nutiteq.fs
Class MotoFileSystem

java.lang.Object
  extended by com.nutiteq.fs.MotoFileSystem
All Implemented Interfaces:
FileSystem

public class MotoFileSystem
extends java.lang.Object
implements FileSystem

File reading using Motorola (not IDEN) file API.

Author:
CristiS

Constructor Summary
MotoFileSystem()
           
 
Method Summary
 java.util.Vector getRoots()
          List all roots in the filesystem
 boolean isDirectory(java.lang.String filename)
          Check if a file is a directory
 java.util.Vector listFiles(java.lang.String path)
          List all files in a directory.
 FileSystemConnection openConnectionToFile(java.lang.String fileName)
           
 byte[] readFile(java.lang.String filename)
          Read a file using JSR-75 API.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MotoFileSystem

public MotoFileSystem()
Method Detail

getRoots

public java.util.Vector getRoots()
                          throws java.io.IOException
List all roots in the filesystem

Specified by:
getRoots in interface FileSystem
Returns:
a vector containing all the roots
Throws:
java.io.IOException
See Also:
FileSystem.getRoots()

isDirectory

public boolean isDirectory(java.lang.String filename)
Check if a file is a directory

Specified by:
isDirectory in interface FileSystem
Parameters:
filename - file to check
Returns:
true if it is a directory

listFiles

public java.util.Vector listFiles(java.lang.String path)
                           throws java.io.IOException
List all files in a directory.

Specified by:
listFiles in interface FileSystem
Parameters:
path - path to list, null to list root
Returns:
a vector of file names
Throws:
java.io.IOException

readFile

public byte[] readFile(java.lang.String filename)
                throws java.io.IOException
Read a file using JSR-75 API.

Specified by:
readFile in interface FileSystem
Parameters:
filename - fully-qualified file path following "file:///" qualifier
Returns:
file data
Throws:
java.io.IOException - if an exception occurs

openConnectionToFile

public FileSystemConnection openConnectionToFile(java.lang.String fileName)
                                          throws java.io.IOException
Specified by:
openConnectionToFile in interface FileSystem
Throws:
java.io.IOException