Advertisement
nerru86

51Degrees Java API get data file information

Jan 7th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.92 KB | None | 0 0
  1. package datafileinfo;
  2.  
  3. import fiftyone.mobile.detection.Provider;
  4. import fiftyone.mobile.detection.factories.StreamFactory;
  5. import java.io.IOException;
  6.  
  7. /**
  8.  *
  9.  * @author mike
  10.  */
  11. public class DataFileInfo {
  12.  
  13.     /**
  14.      * @param args the command line arguments
  15.      */
  16.     public static void main(String[] args) throws IOException {
  17.         Provider p;
  18.         p = new Provider(StreamFactory.create("C:\\Path\\To\\DataFile.dat"));
  19.        
  20.         System.out.println("Type: " + p.dataSet.getName());
  21.         System.out.println("Version: " + p.dataSet.version);
  22.         System.out.println("Published: " + p.dataSet.published);
  23.         System.out.println("Next Update: " + p.dataSet.nextUpdate);
  24.         System.out.println("Properties: " + p.dataSet.getProperties().size());
  25.         System.out.println("Unique device combinations: " + p.dataSet.deviceCombinations);
  26.        
  27.         System.exit(0);
  28.     }
  29.    
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement