fiftyone.mobile.detection.factories
Class TrieFactory

java.lang.Object
  extended by fiftyone.mobile.detection.factories.TrieFactory

public class TrieFactory
extends Object

Reader used to create a provider from data structured in a decision tree format.


Constructor Summary
TrieFactory()
           
 
Method Summary
static TrieProvider create(String fileName)
          Creates a new provider from the binary file supplied.
private static byte[] ReadDevices(TrieReader reader)
           
private static short[] ReadLookupList(TrieReader reader)
           
private static byte[] ReadProperties(TrieReader reader)
           
private static byte[] ReadStrings(TrieReader reader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrieFactory

public TrieFactory()
Method Detail

create

public static TrieProvider create(String fileName)
                           throws IOException
Creates a new provider from the binary file supplied.

Parameters:
file - Binary file to use to create the provider.
Returns:
A new provider initialised with data from the file provided.
Throws:
IOException

ReadLookupList

private static short[] ReadLookupList(TrieReader reader)
                               throws IOException
Throws:
IOException

ReadStrings

private static byte[] ReadStrings(TrieReader reader)
                           throws IOException
Throws:
IOException

ReadProperties

private static byte[] ReadProperties(TrieReader reader)
                              throws IOException
Throws:
IOException

ReadDevices

private static byte[] ReadDevices(TrieReader reader)
                           throws IOException
Throws:
IOException