org.llrp.ltk.util
Class Util

java.lang.Object
  extended by org.llrp.ltk.util.Util

public class Util
extends java.lang.Object

Util.java provides a number of utility methods such loading a binary message or XML message from a file.


Constructor Summary
Util()
           
 
Method Summary
static LLRPBitList loadBinaryFileContent(java.io.File file)
          loads a binary file from the file system and returns a LLRPBitList object
static LLRPMessage loadBinaryLLRPMessage(java.io.File file)
          loads a binary LLRPMessage from the file system and returns an LLRPMessage object
static java.lang.String loadTextFileContent(java.io.File file)
          loads a text file from the file system and returns the contents as a string
static LLRPMessage loadXMLLLRPMessage(java.io.File file)
          loads a LLRPMessage in LTK-XML format from the file system and returns an LLRPMessage object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

loadBinaryFileContent

public static LLRPBitList loadBinaryFileContent(java.io.File file)
                                         throws java.io.IOException,
                                                java.io.FileNotFoundException
loads a binary file from the file system and returns a LLRPBitList object

Parameters:
file -
Returns:
LLRPBitList containing file contents
Throws:
java.io.IOException
java.io.FileNotFoundException

loadTextFileContent

public static java.lang.String loadTextFileContent(java.io.File file)
                                            throws java.io.IOException,
                                                   java.io.FileNotFoundException
loads a text file from the file system and returns the contents as a string

Parameters:
file -
Returns:
string containing file contents
Throws:
java.io.IOException
java.io.FileNotFoundException

loadBinaryLLRPMessage

public static LLRPMessage loadBinaryLLRPMessage(java.io.File file)
                                         throws java.io.FileNotFoundException,
                                                java.io.IOException,
                                                InvalidLLRPMessageException
loads a binary LLRPMessage from the file system and returns an LLRPMessage object

Parameters:
file -
Returns:
LLRPMessage
Throws:
java.io.FileNotFoundException
java.io.IOException
InvalidLLRPMessageException

loadXMLLLRPMessage

public static LLRPMessage loadXMLLLRPMessage(java.io.File file)
                                      throws java.io.FileNotFoundException,
                                             java.io.IOException,
                                             org.jdom.JDOMException,
                                             InvalidLLRPMessageException
loads a LLRPMessage in LTK-XML format from the file system and returns an LLRPMessage object

Parameters:
file -
Returns:
LLRPMessage
Throws:
java.io.FileNotFoundException
java.io.IOException
InvalidLLRPMessageException
org.jdom.JDOMException


Copyright © 2007 ETH Zurich.