Methods Summary |
---|
public synchronized void | close()
if (stream == null)
throw new IOException("Already closed");
entries.clear();
stream.close();
stream = null;
|
public org.apache.lucene.store.IndexOutput | createOutput(java.lang.String name)Not implemented
throw new UnsupportedOperationException();
|
public void | deleteFile(java.lang.String name)Not implemented
throw new UnsupportedOperationException();
|
public boolean | fileExists(java.lang.String name)Returns true iff a file with the given name exists.
return entries.containsKey(name);
|
public long | fileLength(java.lang.String name)Returns the length of a file in the directory.
FileEntry e = (FileEntry) entries.get(name);
if (e == null)
throw new IOException("File " + name + " does not exist");
return e.length;
|
public long | fileModified(java.lang.String name)Returns the time the compound file was last modified.
return directory.fileModified(fileName);
|
public org.apache.lucene.store.Directory | getDirectory()
return directory;
|
public java.lang.String | getName()
return fileName;
|
public java.lang.String[] | list()Returns an array of strings, one for each file in the directory.
String res[] = new String[entries.size()];
return (String[]) entries.keySet().toArray(res);
|
public org.apache.lucene.store.Lock | makeLock(java.lang.String name)Not implemented
throw new UnsupportedOperationException();
|
public synchronized org.apache.lucene.store.IndexInput | openInput(java.lang.String id)
if (stream == null)
throw new IOException("Stream closed");
FileEntry entry = (FileEntry) entries.get(id);
if (entry == null)
throw new IOException("No sub-file with id " + id + " found");
return new CSIndexInput(stream, entry.offset, entry.length);
|
public void | renameFile(java.lang.String from, java.lang.String to)Not implemented
throw new UnsupportedOperationException();
|
public void | touchFile(java.lang.String name)Set the modified time of the compound file to now.
directory.touchFile(fileName);
|