net.lenkaspace.creeper.helpers
Class CRFileIOHelper

java.lang.Object
  extended by net.lenkaspace.creeper.helpers.CRFileIOHelper

public class CRFileIOHelper
extends java.lang.Object

Provides static method for saving Java component images and text into files.

Version:
2.0
Author:
Lenka Pitonakova contact@lenkaspace.net

Constructor Summary
CRFileIOHelper()
           
 
Method Summary
static void componentToJpeg(java.awt.Component component_, java.lang.String fileName)
          Print a Java Component into an image file
static void stringToFile(java.lang.String stringToPrint_, java.lang.String fileName_)
          Put a string into a new txt file
static void stringToFile(java.lang.String stringToPrint_, java.lang.String fileName_, java.lang.String extension_)
          Put a string into a new file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRFileIOHelper

public CRFileIOHelper()
Method Detail

componentToJpeg

public static void componentToJpeg(java.awt.Component component_,
                                   java.lang.String fileName)
Print a Java Component into an image file

Parameters:
component_ - Component to print
fileName - String filename without an extension

stringToFile

public static void stringToFile(java.lang.String stringToPrint_,
                                java.lang.String fileName_)
Put a string into a new txt file

Parameters:
stringToPrint_ - String contents of the file
fileName_ - String filename without an extension

stringToFile

public static void stringToFile(java.lang.String stringToPrint_,
                                java.lang.String fileName_,
                                java.lang.String extension_)
Put a string into a new file

Parameters:
stringToPrint_ - String contents of the file
fileName_ - String filename without an extension
extension_ - String extension without a dot. Set to 'txt' by default.