org.geotools.data.shapefile.indexed.attribute
Class AttributeIndexWriter

java.lang.Object
  extended by org.geotools.data.shapefile.indexed.attribute.AttributeIndexWriter

public class AttributeIndexWriter
extends java.lang.Object

Class used to create an index for an dbf attribute

Author:
Manuele Ventoruzzo

Field Summary
static int HEADER_SIZE
           
 
Constructor Summary
AttributeIndexWriter(java.lang.String attribute, java.nio.channels.FileChannel writeChannel, java.nio.channels.ReadableByteChannel readChannel, int cacheSize)
          Create a new instance of AttributeIndexWriter
 
Method Summary
 void buildIndex()
          Build index, caching data in chucks and sorting it.
 int getCount()
          Returns the number of attributes indexed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEADER_SIZE

public static final int HEADER_SIZE
See Also:
Constant Field Values
Constructor Detail

AttributeIndexWriter

public AttributeIndexWriter(java.lang.String attribute,
                            java.nio.channels.FileChannel writeChannel,
                            java.nio.channels.ReadableByteChannel readChannel,
                            int cacheSize)
                     throws java.io.IOException
Create a new instance of AttributeIndexWriter

Parameters:
attribute - Attribute to be indexed
writeChannel - Channel used to write the index
readChannel - Channel used to read attributes file
Throws:
java.io.IOException
Method Detail

buildIndex

public void buildIndex()
                throws java.io.IOException
Build index, caching data in chucks and sorting it.

Throws:
java.io.IOException

getCount

public int getCount()
Returns the number of attributes indexed



Copyright © 1996-2010 Geotools. All Rights Reserved.