ru.smartflex.tools.dbf.mem
Class MemEngine

java.lang.Object
  extended by ru.smartflex.tools.dbf.mem.MemEngine

public class MemEngine
extends java.lang.Object

The main class that supplies .mem reader - start here.

The reader may be used in that manner:
First of all you have to get MemBag object (don't forget to specify encoding):

 MemBag memBag = MemEngine.getMemBag(
                Fp26MemReader.class.getResourceAsStream("TEST_MEM.MEM"), "Cp866");
 
 
Then you may get value from simple variables and arrays. For example:
 
 memBag.getString("tstr_1"); // get value from simple variable
 memBag.getArrayElement("tarr_two", 3, 2); // get value from array element
 
 
Information about mem file structure was read from http://www.clicketyclick.dk/databases/xbase/format/index.html

Since:
1.05
Author:
galisha

Method Summary
static MemBag getMemBag(java.io.File memFile, java.lang.String enc)
          Gets MemBag object from .mem file
static MemBag getMemBag(java.io.InputStream memStream, java.lang.String enc)
          Gets MemBag object from input stream
static MemBag getMemBag(java.lang.String memFileName, java.lang.String enc)
          Gets MemBag object from .mem file
static MemBag getMemBag(java.lang.String path, java.lang.String memFileName, java.lang.String enc)
          Gets MemBag object from .mem file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMemBag

public static MemBag getMemBag(java.lang.String memFileName,
                               java.lang.String enc)
Gets MemBag object from .mem file

Parameters:
memFileName - file name
enc - encoding
Returns:
MemBag object
Since:
1.05

getMemBag

public static MemBag getMemBag(java.lang.String path,
                               java.lang.String memFileName,
                               java.lang.String enc)
Gets MemBag object from .mem file

Parameters:
path - path to file
memFileName - file name
enc - encoding
Returns:
MemBag object
Since:
1.05

getMemBag

public static MemBag getMemBag(java.io.File memFile,
                               java.lang.String enc)
Gets MemBag object from .mem file

Parameters:
memFile - .mem file
enc - encoding
Returns:
MemBag object
Since:
1.05

getMemBag

public static MemBag getMemBag(java.io.InputStream memStream,
                               java.lang.String enc)
Gets MemBag object from input stream

Parameters:
memStream - stream
enc - encoding
Returns:
MemBag object
Since:
1.05