Class TestFileIO

java.lang.Object
  extended by MIDlet
      extended by TestFileIO
All Implemented Interfaces:
FileIOListener

public class TestFileIO
extends MIDlet
implements FileIOListener

This class can be used to test the FileIO and the FileIOListener classes.

Author:
Michel Deriaz

Constructor Summary
TestFileIO()
           
 
Method Summary
 void fileAppended(int state)
          Called when the operation launched by the FileIO.append method ends up.
 void fileRead(int state, byte[] content)
          Called when the operation launched by the FileIO.read method ends up.
 void fileWritten(int state)
          Called when the operation launched by the FileIO.write method ends up.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestFileIO

public TestFileIO()
Method Detail

fileRead

public void fileRead(int state,
                     byte[] content)
Description copied from interface: FileIOListener
Called when the operation launched by the FileIO.read method ends up.

Specified by:
fileRead in interface FileIOListener
Parameters:
state - describes how the operation ended up. Can be STATE_OK, STATE_PROBLEM, STATE_NOT_READY, or STATE_FILENAME_NULL
content - the content of the file

fileWritten

public void fileWritten(int state)
Description copied from interface: FileIOListener
Called when the operation launched by the FileIO.write method ends up.

Specified by:
fileWritten in interface FileIOListener
Parameters:
state - describes how the operation ended up. Can be STATE_OK, STATE_PROBLEM, STATE_NOT_READY, STATE_FILENAME_NULL, or STATE_CONTENT_NULL

fileAppended

public void fileAppended(int state)
Description copied from interface: FileIOListener
Called when the operation launched by the FileIO.append method ends up.

Specified by:
fileAppended in interface FileIOListener
Parameters:
state - describes how the operation ended up. Can be STATE_OK, STATE_PROBLEM, STATE_NOT_READY, STATE_FILENAME_NULL, or STATE_CONTENT_NULL