org.erowid.sperosearch.splitindex
Class SplitIndexFileDescriptor

java.lang.Object
  extended byorg.erowid.sperosearch.splitindex.SplitIndexFileDescriptor
Direct Known Subclasses:
WriteableSplitIndexFileDescriptor

public class SplitIndexFileDescriptor
extends Object

A descriptor of a logical file in a split index. A logical file consists of multiple individual segment files.

Version:
: $Header: /cvsroot/sperowider/SPEROWIDER_MODULE/javasource/org/erowid/sperosearch/splitindex/SplitIndexFileDescriptor.java,v 1.1 2005/06/02 06:07:58 gurustu Exp $
Author:
: $Author: gurustu $

Constructor Summary
SplitIndexFileDescriptor(SplitIndexDirectoryDescriptor directoryDescriptor, String filename)
          Creates a(n) SperowiderSplitIndexFileDescriptor object in writeable mode.
 
Method Summary
 SplitIndexDirectoryDescriptor getDirectoryDescriptor()
          Returns the directoryDescriptor.
 String getFileName()
          Returns the fileName.
 int getSegmentCount()
          Returns the number of segments in this file.
protected  String getSegmentFilename(int segment)
          Returns the filename for a specific segment.
 long getSize()
          Returns the uncompressed size of this logical file.
 URL getUrlForReading(int segment)
          The URL of this directory, for reading.
protected  void setData(String[] segmentFileNames, long size)
          Sets the array of the segment file names, in order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitIndexFileDescriptor

public SplitIndexFileDescriptor(SplitIndexDirectoryDescriptor directoryDescriptor,
                                String filename)
                         throws IOException
Creates a(n) SperowiderSplitIndexFileDescriptor object in writeable mode.

Method Detail

getFileName

public String getFileName()
Returns the fileName.


getUrlForReading

public URL getUrlForReading(int segment)
                     throws MalformedURLException
The URL of this directory, for reading.

Throws:
MalformedURLException

setData

protected void setData(String[] segmentFileNames,
                       long size)
Sets the array of the segment file names, in order.


getSegmentFilename

protected String getSegmentFilename(int segment)
Returns the filename for a specific segment.


getSize

public long getSize()
Returns the uncompressed size of this logical file.


getSegmentCount

public int getSegmentCount()
Returns the number of segments in this file.


getDirectoryDescriptor

public SplitIndexDirectoryDescriptor getDirectoryDescriptor()
Returns the directoryDescriptor.


spero logo small Sperowider is
© 2005 Erowid.org