org.apache.nutch.ndfs
Class NDFSFile

java.lang.Object
  extended byjava.io.File
      extended byorg.apache.nutch.ndfs.NDFSFile
All Implemented Interfaces:
Comparable, Serializable

public class NDFSFile
extends File

NDFSFile is a traditional java File that's been annotated with some extra information.

Author:
Mike Cafarella
See Also:
Serialized Form

Field Summary
static String NDFS_FILE_SEPARATOR
          Separator used in NDFS filenames.
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
NDFSFile(NDFSFileInfo info)
           
 
Method Summary
 boolean canRead()
          A number of File methods are unsupported in this subclass
 boolean canWrite()
           
 boolean createNewFile()
           
 boolean delete()
           
 void deleteOnExit()
           
 long getContentsLength()
          And add a few extras
static String getNDFSParent(String path)
          Retrieving parent path from NDFS path string
 boolean isDirectory()
          We need to reimplement some of them
 boolean isFile()
           
 boolean isHidden()
           
 long length()
           
 
Methods inherited from class java.io.File
compareTo, compareTo, createTempFile, createTempFile, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, lastModified, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toString, toURI, toURL
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NDFS_FILE_SEPARATOR

public static final String NDFS_FILE_SEPARATOR
Separator used in NDFS filenames.

See Also:
Constant Field Values
Constructor Detail

NDFSFile

public NDFSFile(NDFSFileInfo info)
Method Detail

canRead

public boolean canRead()
A number of File methods are unsupported in this subclass


canWrite

public boolean canWrite()

createNewFile

public boolean createNewFile()

delete

public boolean delete()

deleteOnExit

public void deleteOnExit()

isHidden

public boolean isHidden()

isDirectory

public boolean isDirectory()
We need to reimplement some of them


isFile

public boolean isFile()

length

public long length()

getContentsLength

public long getContentsLength()
And add a few extras


getNDFSParent

public static String getNDFSParent(String path)
Retrieving parent path from NDFS path string

Parameters:
path - - NDFS path
Returns:
- parent path of NDFS path, or null if no parent exist.


Copyright © 2006 The Apache Software Foundation