gistoolkit.datasources.shapefile
Class DbaseFileWriter

java.lang.Object
  extended bygistoolkit.datasources.shapefile.DbaseFileStream
      extended bygistoolkit.datasources.shapefile.DbaseFileWriter

public class DbaseFileWriter
extends DbaseFileStream

A DbaseFileReader is used to write dbase III records out one at a time.

Author:
head

Field Summary
protected  java.lang.String myDbfExt
           
protected  LEDataOutputStream myDbfStream
           
protected  java.lang.String[] myFieldNames
           
protected  AttributeType[] myFieldTypes
           
protected  java.lang.String myFilename
           
protected  java.lang.String myGzipExt
           
protected  DbaseFileHeader myHeader
           
 
Constructor Summary
DbaseFileWriter(java.lang.String filename)
           
DbaseFileWriter(java.lang.String filename, DbaseFileHeader inHeader)
           
 
Method Summary
 void close()
           
 boolean equiv(DbaseFileStream that)
          Returns equivalency between this reader and another.
protected  void finalize()
           
 java.lang.String[] getFieldNames()
          Returns the field names for the dbase file being read.
 AttributeType[] getFieldTypes()
          Returns the field names for the dbase file being read.
 DbaseFileHeader getHeader()
          Return the shapefile header associated with this reader
protected  void setFile(java.lang.String inFilename)
          Set the file name for this shape file.
 void write(Record inRec)
          Appends the passed record to the dbase file.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myDbfStream

protected LEDataOutputStream myDbfStream

myFilename

protected java.lang.String myFilename

myDbfExt

protected java.lang.String myDbfExt

myGzipExt

protected java.lang.String myGzipExt

myHeader

protected DbaseFileHeader myHeader

myFieldNames

protected java.lang.String[] myFieldNames

myFieldTypes

protected AttributeType[] myFieldTypes
Constructor Detail

DbaseFileWriter

public DbaseFileWriter(java.lang.String filename)
                throws java.io.FileNotFoundException,
                       java.io.IOException

DbaseFileWriter

public DbaseFileWriter(java.lang.String filename,
                       DbaseFileHeader inHeader)
                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
Throws:
java.io.IOException

write

public void write(Record inRec)
           throws java.io.IOException
Appends the passed record to the dbase file.

Throws:
java.io.IOException

setFile

protected void setFile(java.lang.String inFilename)
Set the file name for this shape file. The case-sensitive logic is needed for filesystems where case is relevant.


getHeader

public DbaseFileHeader getHeader()
Return the shapefile header associated with this reader


getFieldNames

public java.lang.String[] getFieldNames()
Returns the field names for the dbase file being read.


getFieldTypes

public AttributeType[] getFieldTypes()
Returns the field names for the dbase file being read.


equiv

public boolean equiv(DbaseFileStream that)
Returns equivalency between this reader and another. Equivalency means that the headers of the files being read are consistent (same types of shapes and attributes in each).