|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.erowid.sperosearch.splitindex.SplitIndexDirectoryDescriptor
Information about a directory with a split index. Files, sizes, etc. This operates in two modes : read only from a URL, and read/write from a File that is the data directory.
Field Summary | |
protected static String |
DESCRIPTOR_FILE_NAME
Name of the descriptor file. |
protected static int |
DESCRIPTOR_VERSION_NUMBER
The descriptor version. |
Constructor Summary | |
protected |
SplitIndexDirectoryDescriptor(URL url)
Creates a read-only descriptor. |
Method Summary | |
protected void |
addFileDescriptor(SplitIndexFileDescriptor descriptor)
Returns the map of file descriptors, so that extending classes may manipulate it. |
protected Object |
clone()
|
boolean |
fileExists(String filename)
Checks for file existence. |
SplitIndexFileDescriptor |
getFileDescriptor(String filename)
Gets a file descriptor by name. |
static SplitIndexDirectoryDescriptor |
getInstance(URL url)
Creates a read only directory descriptor. |
int |
getSegmentSize()
Returns the size of a given segment, before compression. |
URL |
getUrl()
The URL of this directory, for reading. |
String[] |
listFiles()
Lists the filenames of all files. |
void |
loadDescriptor()
Loads this directory descriptor. |
protected void |
setSegmentSize(int segmentSize)
Sets the segment size, preperator to saving. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final String DESCRIPTOR_FILE_NAME
protected static final int DESCRIPTOR_VERSION_NUMBER
Constructor Detail |
protected SplitIndexDirectoryDescriptor(URL url)
Method Detail |
public static SplitIndexDirectoryDescriptor getInstance(URL url)
protected Object clone() throws CloneNotSupportedException
CloneNotSupportedException
protected void addFileDescriptor(SplitIndexFileDescriptor descriptor)
public SplitIndexFileDescriptor getFileDescriptor(String filename)
public URL getUrl()
public int getSegmentSize()
protected void setSegmentSize(int segmentSize)
public void loadDescriptor() throws IOException
WriteableSplitIndexDirectoryDescriptor.saveDescriptor()
.
IOException
- If there's a problem reading.public String[] listFiles()
public boolean fileExists(String filename) throws IOException
IOException
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |