Java Doc for DbaseFileHeader.java in  » GIS » GeoTools-2.4.1 » org » geotools » data » shapefile » dbf » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.data.shapefile.dbf 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.data.shapefile.dbf.DbaseFileHeader

DbaseFileHeader
public class DbaseFileHeader (Code)
Class to represent the header of a Dbase III file. Creation date: (5/15/2001 5:15:30 PM)

Inner Class :class DbaseField



Method Summary
public  voidaddColumn(String inFieldName, char inFieldType, int inFieldLength, int inDecimalCount)
     Add a column to this DbaseFileHeader.
public  ClassgetFieldClass(int i)
     Determine the most appropriate Java Class for representing the data in the field.
 All packages are java.lang unless otherwise specified.
 C (Character) -> String
 N (Numeric)   -> Integer or Double (depends on field's decimal count)
 F (Floating)  -> Double
 L (Logical)   -> Boolean
 D (Date)      -> java.util.Date
 Unknown       -> String
 

Parameters:
  i - The index of the field, from 0 to getNumFields() - 1 .
public  intgetFieldDecimalCount(int inIndex)
     Get the decimal count of this field.
Parameters:
  inIndex - The field index.
public  intgetFieldLength(int inIndex)
     Returns the field length in bytes.
Parameters:
  inIndex - The field index.
public  StringgetFieldName(int inIndex)
     Get the field name.
Parameters:
  inIndex - The field index.
public  chargetFieldType(int inIndex)
     Get the character class of the field.
Parameters:
  inIndex - The field index.
public  intgetHeaderLength()
    
public  intgetLargestFieldSize()
     Get the largest field size of this table.
public  DategetLastUpdateDate()
     Get the date this file was last updated.
public  intgetNumFields()
     Return the number of fields in the records.
public  intgetNumRecords()
    
public  intgetRecordLength()
     Get the length of the records in bytes.
public  voidreadHeader(ReadableByteChannel channel)
     Read the header data from the DBF file.
Parameters:
  channel - A readable byte channel.
public  intremoveColumn(String inFieldName)
     Remove a column from this DbaseFileHeader.
Parameters:
  inFieldName - The name of the field, will ignore case and trim.
public  voidsetNumRecords(int inNumRecords)
    
public  StringtoString()
     Get a simple representation of this header.
public  voidwriteHeader(WritableByteChannel out)
     Write the header data to the DBF file.
Parameters:
  out - A channel to write to.



Method Detail
addColumn
public void addColumn(String inFieldName, char inFieldType, int inFieldLength, int inDecimalCount) throws DbaseFileException(Code)
Add a column to this DbaseFileHeader. The type is one of (C N L or D) character, number, logical(true/false), or date. The Field length is the total length in bytes reserved for this column. The decimal count only applies to numbers(N), and floating point values (F), and refers to the number of characters to reserve after the decimal point. Don't expect miracles from this...
 Field Type MaxLength
 ---------- ---------
 C          254
 D          8
 F          20
 N          18
 

Parameters:
  inFieldName - The name of the new field, must be less than 10 characters or itgets truncated.
Parameters:
  inFieldType - A character representing the dBase field, ( see above ).Case insensitive.
Parameters:
  inFieldLength - The length of the field, in bytes ( see above )
Parameters:
  inDecimalCount - For numeric fields, the number of decimal places to track.
throws:
  DbaseFileException - If the type is not recognized.



getFieldClass
public Class getFieldClass(int i)(Code)
Determine the most appropriate Java Class for representing the data in the field.
 All packages are java.lang unless otherwise specified.
 C (Character) -> String
 N (Numeric)   -> Integer or Double (depends on field's decimal count)
 F (Floating)  -> Double
 L (Logical)   -> Boolean
 D (Date)      -> java.util.Date
 Unknown       -> String
 

Parameters:
  i - The index of the field, from 0 to getNumFields() - 1 . A Class which closely represents the dbase field type.



getFieldDecimalCount
public int getFieldDecimalCount(int inIndex)(Code)
Get the decimal count of this field.
Parameters:
  inIndex - The field index. The decimal count.



getFieldLength
public int getFieldLength(int inIndex)(Code)
Returns the field length in bytes.
Parameters:
  inIndex - The field index. The length in bytes.



getFieldName
public String getFieldName(int inIndex)(Code)
Get the field name.
Parameters:
  inIndex - The field index. The name of the field.



getFieldType
public char getFieldType(int inIndex)(Code)
Get the character class of the field.
Parameters:
  inIndex - The field index. The dbase character representing this field.



getHeaderLength
public int getHeaderLength()(Code)
Get the length of the header The length of the header in bytes.



getLargestFieldSize
public int getLargestFieldSize()(Code)
Get the largest field size of this table. The largt field size iiin bytes.



getLastUpdateDate
public Date getLastUpdateDate()(Code)
Get the date this file was last updated. The Date last modified.



getNumFields
public int getNumFields()(Code)
Return the number of fields in the records. The number of fields in this table.



getNumRecords
public int getNumRecords()(Code)
Return the number of records in the file The number of records in this table.



getRecordLength
public int getRecordLength()(Code)
Get the length of the records in bytes. The number of bytes per record.



readHeader
public void readHeader(ReadableByteChannel channel) throws IOException(Code)
Read the header data from the DBF file.
Parameters:
  channel - A readable byte channel. If you have an InputStream you need to use, you cancall java.nio.Channels.getChannel(InputStream in).
throws:
  IOException - If errors occur while reading.



removeColumn
public int removeColumn(String inFieldName)(Code)
Remove a column from this DbaseFileHeader.
Parameters:
  inFieldName - The name of the field, will ignore case and trim. index of the removed column, -1 if no found



setNumRecords
public void setNumRecords(int inNumRecords)(Code)
Set the number of records in the file
Parameters:
  inNumRecords - The number of records.



toString
public String toString()(Code)
Get a simple representation of this header. A String representing the state of the header.



writeHeader
public void writeHeader(WritableByteChannel out) throws IOException(Code)
Write the header data to the DBF file.
Parameters:
  out - A channel to write to. If you have an OutputStream you can obtain the correctchannel by using java.nio.Channels.newChannel(OutputStream out).
throws:
  IOException - If errors occur.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.