类 AttributeTable

  • 所有已实现的接口:
    java.lang.Cloneable

    public final class AttributeTable
    extends java.lang.Object
    implements java.lang.Cloneable
    Attribute table of shape file
    作者:
    yaqiang
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      java.lang.Object clone()
      Clone
      void fill​(int numRows)
      This populates the Table with data from the file.
      java.lang.String getEncoding()
      Get encoding string
      java.io.File getFile()
      Get file
      int getNumRecords()
      Get record number
      DataTable getTable()
      Get data table
      void open​(java.lang.String filename)
      Reads all the information from the file, including the vector shapes and the database component.
      void openDBF​(java.lang.String fileName)
      Reads all the information from the dBase file, including the vector shapes and the database component.
      void save()
      Save the file
      void save​(java.lang.String fileName)
      Save the file
      void saveAs​(java.lang.String fileName, boolean overwrite)
      Save this table to the specified file name
      void setEncoding​(java.lang.String value)
      Set encoding string
      void setTable​(DataTable table)
      Set data table
      void updateDataTable()
      Update data table - convert DataColumn to Field
      void writeHeader​(EndianDataOutputStream writer)
      Write the header data to the DBF file
      void writeTable()
      This appends the content of one datarow to a DBF file
      • 从类继承的方法 java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • AttributeTable

        public AttributeTable()
        Constructor
      • AttributeTable

        public AttributeTable​(java.lang.String filename)
                       throws java.io.FileNotFoundException,
                              java.io.IOException,
                              java.lang.Exception
        Constructor
        参数:
        filename - The file name
        抛出:
        java.io.FileNotFoundException
        java.io.IOException
        java.lang.Exception
    • 方法详细资料

      • getFile

        public java.io.File getFile()
        Get file
        返回:
        File
      • getNumRecords

        public int getNumRecords()
        Get record number
        返回:
        Record number
      • getTable

        public DataTable getTable()
        Get data table
        返回:
        The data table
      • setTable

        public void setTable​(DataTable table)
        Set data table
        参数:
        table - The data table
      • getEncoding

        public java.lang.String getEncoding()
        Get encoding string
        返回:
        Encoding string
      • setEncoding

        public void setEncoding​(java.lang.String value)
        Set encoding string
        参数:
        value - Encoding string
      • updateDataTable

        public void updateDataTable()
        Update data table - convert DataColumn to Field
      • open

        public void open​(java.lang.String filename)
                  throws java.io.FileNotFoundException,
                         java.io.IOException,
                         java.lang.Exception
        Reads all the information from the file, including the vector shapes and the database component.
        参数:
        filename - The file name
        抛出:
        java.io.FileNotFoundException
        java.io.IOException
        java.lang.Exception
      • openDBF

        public void openDBF​(java.lang.String fileName)
                     throws java.io.FileNotFoundException,
                            java.io.IOException,
                            java.lang.Exception
        Reads all the information from the dBase file, including the vector shapes and the database component.
        参数:
        fileName - The dBase file name
        抛出:
        java.io.FileNotFoundException
        java.io.IOException
        java.lang.Exception
      • fill

        public void fill​(int numRows)
                  throws java.io.FileNotFoundException,
                         java.io.IOException,
                         java.lang.Exception
        This populates the Table with data from the file.
        参数:
        numRows - In the event that the dbf file is not found, this indicates how many blank rows should exist in the attribute Table.
        抛出:
        java.io.FileNotFoundException
        java.io.IOException
        java.lang.Exception
      • save

        public void save()
        Save the file
      • save

        public void save​(java.lang.String fileName)
        Save the file
        参数:
        fileName - File name
      • saveAs

        public void saveAs​(java.lang.String fileName,
                           boolean overwrite)
        Save this table to the specified file name
        参数:
        fileName - The file name to be saved
        overwrite - If over write the file if it exists
      • writeHeader

        public void writeHeader​(EndianDataOutputStream writer)
                         throws java.io.IOException
        Write the header data to the DBF file
        参数:
        writer - The writer stream
        抛出:
        java.io.IOException - IO exception
      • writeTable

        public void writeTable()
                        throws java.io.IOException
        This appends the content of one datarow to a DBF file
        抛出:
        java.io.IOException
      • clone

        public java.lang.Object clone()
        Clone
        覆盖:
        clone 在类中 java.lang.Object
        返回:
        AttributeTable object