deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.io.shpapi
Class FileHeader

java.lang.Object
  extended by org.deegree.io.shpapi.FileHeader

public class FileHeader
extends Object

Class representing an ESRI Index File Header.

Uses class ByteUtils ShapeUtils modified from the original package com.bbn.openmap.layer.shape
Copyright (C) 1998 BBN Corporation 10 Moulton St. Cambridge, MA 02138

Version:
16.08.2000
Author:
Andreas Poth

Constructor Summary
FileHeader(RandomAccessFile rafShp_)
          Construct a IndexFileHeader from a file name.
FileHeader(RandomAccessFile rafShp_, boolean newHeader)
          Construct a IndexFileHeader from a file name.
 
Method Summary
 long getFileLength()
          method: getFileLength()
returns the length of the shape file in bytes
 SHPEnvelope getFileMBR()
          method: getFileMBR();
Returns the bounding box of this shape file.
 int getFileShapeType()
          method: getFileShapeType()
returns the code for the shape type of the file
 int getFileVersion()
          method: getFileVersion()
returns the version of the shape file
 void writeHeader()
          method: writeHeader()
Writes a blank header into the shape file.
 void writeHeader(int filelength, int shptype, SHPEnvelope mbr)
          method: writeHeader(int filelength, byte shptype,SHPEnvelope mbr)
Writes a header into the shape file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileHeader

public FileHeader(RandomAccessFile rafShp_)
           throws IOException
Construct a IndexFileHeader from a file name.

Parameters:
rafShp_ -
Throws:
IOException

FileHeader

public FileHeader(RandomAccessFile rafShp_,
                  boolean newHeader)
           throws IOException
Construct a IndexFileHeader from a file name.

Parameters:
rafShp_ -
newHeader -
Throws:
IOException
Method Detail

getFileMBR

public SHPEnvelope getFileMBR()
method: getFileMBR();
Returns the bounding box of this shape file. The bounding box
is the smallest rectangle that encloses all the shapes in the
file.

Returns:
the bounding box of this shape file. The bounding box
is the smallest rectangle that encloses all the shapes in the
file.

getFileLength

public long getFileLength()
method: getFileLength()
returns the length of the shape file in bytes

Returns:
the length of the shape file in bytes

getFileVersion

public int getFileVersion()
method: getFileVersion()
returns the version of the shape file

Returns:
the version of the shape file

getFileShapeType

public int getFileShapeType()
method: getFileShapeType()
returns the code for the shape type of the file

Returns:
the code for the shape type of the file

writeHeader

public void writeHeader()
                 throws IOException
method: writeHeader()
Writes a blank header into the shape file.

Throws:
IOException

writeHeader

public void writeHeader(int filelength,
                        int shptype,
                        SHPEnvelope mbr)
                 throws IOException
method: writeHeader(int filelength, byte shptype,SHPEnvelope mbr)
Writes a header into the shape file.

Parameters:
filelength -
shptype -
mbr -
Throws:
IOException

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org