com.ibm.richtext.textapps
Class FileUtils

java.lang.Object
  |
  +--com.ibm.richtext.textapps.FileUtils

public class FileUtils
extends java.lang.Object


Constructor Summary
FileUtils()
           
 
Method Summary
static MConstText loadMText(java.io.File file)
          Return the MText serialized in the given file.
static void saveMText(java.io.File file, MConstText text)
           
static java.io.File userLoadMText(java.lang.String title, MText dest, java.awt.Frame owner)
          Present the user with a file dialog, and replace dest with the MText in the selected file, and return the file objct.
static java.io.File userSaveMText(java.io.File file, java.lang.String title, MConstText text, java.awt.Frame owner)
          Prompt the user for the file if file is null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtils

public FileUtils()
Method Detail

userLoadMText

public static java.io.File userLoadMText(java.lang.String title,
                                         MText dest,
                                         java.awt.Frame owner)
Present the user with a file dialog, and replace dest with the MText in the selected file, and return the file objct. If any errors occur, return null and do not modify dest.

loadMText

public static MConstText loadMText(java.io.File file)
Return the MText serialized in the given file. In case of an error return null.

userSaveMText

public static java.io.File userSaveMText(java.io.File file,
                                         java.lang.String title,
                                         MConstText text,
                                         java.awt.Frame owner)
Prompt the user for the file if file is null. Then save the text in the file, if any.

saveMText

public static void saveMText(java.io.File file,
                             MConstText text)


Copyright (c) 2001 IBM Corporation and others.