jwo.landserf.process.io
Class LandSerfIO

java.lang.Object
  extended by jwo.landserf.process.io.FileIO
      extended by jwo.landserf.process.io.LandSerfIO

public class LandSerfIO
extends FileIO

Contains a collection of static methods for reading and writing LandSerf format files.

Version:
2.3, 10th April, 2007.
Author:
Jo Wood

Field Summary
 
Fields inherited from class jwo.landserf.process.io.FileIO
BIG_ENDIAN, bitsPerValue, byteOrder, DEBUG, errorMessage, filePointer, GATHER_INFO, lineNumber, LITTLE_ENDIAN, LOAD_ALL, LOAD_SELECTED, nullCode, substituteNull, useMultiplier, zMultiplier
 
Constructor Summary
LandSerfIO()
          There should be no need to call the constructor explicitly since all methods are static.
 
Method Summary
static RasterMap readOldRaster(String fileName)
          Reads a pre 2.0 version of serialized LandSerf raster map.
static VectorMap readOldVector(String fileName)
          Reads a pre 2.0 version of serialized LandSerf vector map.
static RasterMap readRaster(String fileName)
          Attempts to read the given file representing a serialized raster map.
static VectorMap readVector(String fileName)
          Attempts to read the given file representing a serialized vector map.
static boolean write(SpatialObject spObject, String fileName)
          Attempts to save the given spatial object as the given file.
 
Methods inherited from class jwo.landserf.process.io.FileIO
debug, getErrorMessage, readByte, readByte, readCharacters, readCharacters, readCharactersInLine, readDouble, readDouble, readDoubleBigEndian, readDoubleBigEndian, readDoubleLittleEndian, readDoubleLittleEndian, readFloat, readFloat, readFloatBigEndian, readFloatBigEndian, readFloatLittleEndian, readFloatLittleEndian, readInt, readInt, readIntBigEndian, readIntBigEndian, readIntLittleEndian, readIntLittleEndian, readNextWord, readNextWord, readShort, readShort, readShortBigEndian, readShortBigEndian, readShortLittleEndian, readShortLittleEndian, readUnsignedByte, readUnsignedByte, reset, seek, skip, skip, writeByte, writeCharacters, writeDouble, writeDoubleBigEndian, writeDoubleLittleEndian, writeFloat, writeFloatBigEndian, writeFloatLittleEndian, writeInt, writeIntBigEndian, writeIntLittleEndian, writeLine, writeShort, writeShortBigEndian, writeShortLittleEndian
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LandSerfIO

public LandSerfIO()
There should be no need to call the constructor explicitly since all methods are static.

Method Detail

write

public static boolean write(SpatialObject spObject,
                            String fileName)
Attempts to save the given spatial object as the given file.

Parameters:
spObject - Spatial object to save.
fileName - Name of file to save.
Returns:
true if saved correctly.

readRaster

public static RasterMap readRaster(String fileName)
Attempts to read the given file representing a serialized raster map.

Parameters:
fileName - Name of file to read.
Returns:
Raster map holding contents of file, or null if problems reading.

readOldRaster

public static RasterMap readOldRaster(String fileName)
Reads a pre 2.0 version of serialized LandSerf raster map.

Parameters:
fileName - Name of file to read.
Returns:
Raster map holding contents of file, or null if problems reading.

readVector

public static VectorMap readVector(String fileName)
Attempts to read the given file representing a serialized vector map.

Parameters:
fileName - Name of file to read.
Returns:
RasterMap holding contents of file, or null if problems reading.

readOldVector

public static VectorMap readOldVector(String fileName)
Reads a pre 2.0 version of serialized LandSerf vector map.

Parameters:
fileName - Name of file to read.
Returns:
Vector map holding contents of file, or null if problems reading.


Copyright Jo Wood, 1996-2009, last modified, 17th April, 2009