|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.store.Directory
org.apache.lucene.index.CompoundFileReader
Class for accessing a compound stream. This class implements a directory, but is limited to only read operations. Directory methods that would normally modify data throw an exception.
Constructor Summary | |
CompoundFileReader(Directory dir,
String name)
|
Method Summary | |
void |
close()
Closes the store. |
OutputStream |
createFile(String name)
Creates a new, empty file in the directory with the given name. |
void |
deleteFile(String name)
Removes an existing file in the directory. |
boolean |
fileExists(String name)
Returns true iff a file with the given name exists. |
long |
fileLength(String name)
Returns the length of a file in the directory. |
long |
fileModified(String name)
Returns the time the named file was last modified. |
Directory |
getDirectory()
|
String |
getName()
|
String[] |
list()
Returns an array of strings, one for each file in the directory. |
Lock |
makeLock(String name)
Construct a Lock . |
InputStream |
openFile(String id)
Returns a stream reading an existing file. |
void |
renameFile(String from,
String to)
Renames an existing file in the directory. |
void |
touchFile(String name)
Set the modified time of an existing file to now. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CompoundFileReader(Directory dir, String name) throws IOException
Method Detail |
public Directory getDirectory()
public String getName()
public void close() throws IOException
Directory
close
in class Directory
IOException
public InputStream openFile(String id) throws IOException
Directory
openFile
in class Directory
IOException
public String[] list()
list
in class Directory
public boolean fileExists(String name)
fileExists
in class Directory
public long fileModified(String name) throws IOException
fileModified
in class Directory
IOException
public void touchFile(String name) throws IOException
touchFile
in class Directory
IOException
public void deleteFile(String name)
deleteFile
in class Directory
public void renameFile(String from, String to)
renameFile
in class Directory
public long fileLength(String name) throws IOException
fileLength
in class Directory
IOException
public OutputStream createFile(String name)
createFile
in class Directory
public Lock makeLock(String name)
Lock
.
makeLock
in class Directory
name
- the name of the lock file
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |