gistoolkit.datasources.shapefile
Class ShapeFileWriter

java.lang.Object
  extended bygistoolkit.datasources.shapefile.ShapeFileStream
      extended bygistoolkit.datasources.shapefile.ShapeFileWriter

public class ShapeFileWriter
extends ShapeFileStream

A ShapeFileReader is used to write shapes out to a shapefile one at a time.

Author:
head

Field Summary
protected  LEDataOutputStream myShpStream
           
protected  LEDataOutputStream myShxStream
           
 
Fields inherited from class gistoolkit.datasources.shapefile.ShapeFileStream
myDbaseStream, myDbfExt, myFilename, myGzipExt, myHeader, myShpExt, myShxExt
 
Constructor Summary
ShapeFileWriter(java.lang.String filename)
           
 
Method Summary
 void close()
          Closes the files for writing and re-writes the header with the correct number of records that were written.
protected  void finalize()
           
 void write(Record rec)
          Append the shape to the output files
 
Methods inherited from class gistoolkit.datasources.shapefile.ShapeFileStream
equiv, getHeader, setFile
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myShpStream

protected LEDataOutputStream myShpStream

myShxStream

protected LEDataOutputStream myShxStream
Constructor Detail

ShapeFileWriter

public ShapeFileWriter(java.lang.String filename)
                throws java.io.FileNotFoundException,
                       java.io.IOException
Method Detail

finalize

protected void finalize()
                 throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Closes the files for writing and re-writes the header with the correct number of records that were written.

Throws:
java.io.IOException

write

public void write(Record rec)
           throws java.io.IOException
Append the shape to the output files

Throws:
java.io.IOException