danger.app
Class DataRecordReader

java.lang.Object
  extended by danger.app.DataRecordReader


public class DataRecordReader
extends Object

Static methods that take a byte array and read data from it, without requiring a data record object. Useful if all you're doing is reading data from a byte array that's been structured as a data record, but you don't want all the other stuff. Must be updated in parallel with class DataRecord, sigh.


Method Summary
static int collate(DangerCollator dc, byte[] data, int row, int col, String other)
           
static int countColumns(byte[] data, int row)
           
static void drawString(byte[] data, int row, int col, Pen p, int x, int y)
           
static boolean findString(byte[] data, DangerCollator dc, DataFinder df, byte[] key, int row, int col, int mode)
           
static boolean findString(byte[] data, DataFinder df, byte[] key, int row, int col, int mode)
           
static boolean findStringContains(byte[] data, DataFinder df, byte[] key, int row, int col)
           
static boolean findStringContainsIgnoreCase(byte[] data, DataFinder df, byte[] keyUpperCase, int row, int col)
           
static boolean findStringExactMatch(byte[] data, DataFinder df, byte[] key, int row, int col)
           
static boolean findStringExactMatchIgnoreCase(byte[] data, DataFinder df, byte[] keyUpperCase, int row, int col)
           
static boolean findStringStartsWith(byte[] data, DataFinder df, byte[] key, int row, int col)
           
static boolean findStringStartsWithIgnoreCase(byte[] data, DataFinder df, byte[] keyUpperCase, int row, int col)
           
static byte[] getByteArray(byte[] data, int row, int col)
           
static int getInt(byte[] data, int row, int col)
           
static String getInternString(byte[] data, int row, int col)
           
static int getShort(byte[] data, int row, int col)
           
static String getString(byte[] data, int row, int col)
           
static int getStringLength(byte[] data, int row, int col)
           
static int getStringOffset(byte[] data, int row, int col)
           
static int stringCompareIgnoreCase(byte[] data, int row, int col, String other)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

countColumns

public static int countColumns(byte[] data,
                               int row)

getInt

public static int getInt(byte[] data,
                         int row,
                         int col)

getShort

public static int getShort(byte[] data,
                           int row,
                           int col)

getString

public static String getString(byte[] data,
                               int row,
                               int col)

getInternString

public static String getInternString(byte[] data,
                                     int row,
                                     int col)

getByteArray

public static byte[] getByteArray(byte[] data,
                                  int row,
                                  int col)

findString

public static boolean findString(byte[] data,
                                 DataFinder df,
                                 byte[] key,
                                 int row,
                                 int col,
                                 int mode)

findString

public static boolean findString(byte[] data,
                                 DangerCollator dc,
                                 DataFinder df,
                                 byte[] key,
                                 int row,
                                 int col,
                                 int mode)

findStringContains

public static boolean findStringContains(byte[] data,
                                         DataFinder df,
                                         byte[] key,
                                         int row,
                                         int col)

findStringContainsIgnoreCase

public static boolean findStringContainsIgnoreCase(byte[] data,
                                                   DataFinder df,
                                                   byte[] keyUpperCase,
                                                   int row,
                                                   int col)

findStringStartsWith

public static boolean findStringStartsWith(byte[] data,
                                           DataFinder df,
                                           byte[] key,
                                           int row,
                                           int col)

findStringStartsWithIgnoreCase

public static boolean findStringStartsWithIgnoreCase(byte[] data,
                                                     DataFinder df,
                                                     byte[] keyUpperCase,
                                                     int row,
                                                     int col)

findStringExactMatch

public static boolean findStringExactMatch(byte[] data,
                                           DataFinder df,
                                           byte[] key,
                                           int row,
                                           int col)

findStringExactMatchIgnoreCase

public static boolean findStringExactMatchIgnoreCase(byte[] data,
                                                     DataFinder df,
                                                     byte[] keyUpperCase,
                                                     int row,
                                                     int col)

drawString

public static void drawString(byte[] data,
                              int row,
                              int col,
                              Pen p,
                              int x,
                              int y)

getStringOffset

public static int getStringOffset(byte[] data,
                                  int row,
                                  int col)

getStringLength

public static int getStringLength(byte[] data,
                                  int row,
                                  int col)

collate

public static int collate(DangerCollator dc,
                          byte[] data,
                          int row,
                          int col,
                          String other)

stringCompareIgnoreCase

public static int stringCompareIgnoreCase(byte[] data,
                                          int row,
                                          int col,
                                          String other)