lejos.pc.tools
Class Upload

java.lang.Object
  extended by lejos.pc.comm.NXTCommLoggable
      extended by lejos.pc.tools.Upload

public class Upload
extends NXTCommLoggable

Utility class used by the nxj and nxjupload command line tools. It checks the file, connects to the NXT, uploads the file, optionally runs it, and disconnects. This class is also used by the Eclipse plugin.

Author:
Lawrie Griffiths

Field Summary
 
Fields inherited from class lejos.pc.comm.NXTCommLoggable
fLogListeners
 
Constructor Summary
Upload()
           
 
Method Summary
 void addLogListener(ToolsLogListener listener)
          register log listener
 void removeLogListener(ToolsLogListener listener)
          unregister log listener
 void upload(java.lang.String name, java.lang.String address, int protocols, java.io.File f, java.lang.String nxtFileName, boolean run)
           
 
Methods inherited from class lejos.pc.comm.NXTCommLoggable
addLogListener, log, log, removeLogListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Upload

public Upload()
Method Detail

upload

public void upload(java.lang.String name,
                   java.lang.String address,
                   int protocols,
                   java.io.File f,
                   java.lang.String nxtFileName,
                   boolean run)
            throws NXTNotFoundException,
                   java.io.IOException
Throws:
NXTNotFoundException
java.io.IOException

addLogListener

public void addLogListener(ToolsLogListener listener)
register log listener

Parameters:
listener -

removeLogListener

public void removeLogListener(ToolsLogListener listener)
unregister log listener

Parameters:
listener -