ru.smartflex.tools.dbf.mem
Class MemHelper

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

public class MemHelper
extends java.lang.Object

Helper class that provides conversion from internal .mem file format.

Since:
1.05
Author:
galisha

Method Summary
protected static java.util.Date getDate(double num)
          Return date from double - many thanks to Peter Townsend (He wrote dbmem.c; In Russia we usually said - ku two times ;)).
protected static double getDouble(byte[] record)
           
protected static java.lang.String getFieldName(byte[] record, int off, int len)
           
protected static java.lang.String getString(byte[] record, int off, int len, java.lang.String enc)
           
protected static boolean readFully(java.io.InputStream in, byte[] b, int off, int len)
          Copy past from DataInputStream - many thanks
protected static void reverse(byte[] array)
          Copy past from org.apache.commons.lang3.ArrayUtils - many thanks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDouble

protected static double getDouble(byte[] record)

getDate

protected static java.util.Date getDate(double num)
Return date from double - many thanks to Peter Townsend (He wrote dbmem.c; In Russia we usually said - ku two times ;)).
Limitation: As I understood beginner date is starting with 1600 year.

Parameters:
num -
Returns:

getString

protected static java.lang.String getString(byte[] record,
                                            int off,
                                            int len,
                                            java.lang.String enc)
                                     throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

getFieldName

protected static java.lang.String getFieldName(byte[] record,
                                               int off,
                                               int len)

reverse

protected static void reverse(byte[] array)
Copy past from org.apache.commons.lang3.ArrayUtils - many thanks.

Parameters:
array -

readFully

protected static boolean readFully(java.io.InputStream in,
                                   byte[] b,
                                   int off,
                                   int len)
Copy past from DataInputStream - many thanks

Parameters:
in -
b -
off -
len -
Returns: