core.util
Class StringTools

java.lang.Object
  extended by core.util.StringTools

public class StringTools
extends Object

Tools working on Strings (d'oh)

  Copyright (c) 2006 Sebastian Erdweg
  Copyright (c) 2006 Dominik Schulz
  Copyright (c) 2006 Florian Lindner
  Copyright (c) 2006 Betim Berjani
  
  This file is part of FlexiCrypt.

  FlexiCrypt is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  FlexiCrypt is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  
  You should have received a copy of the GNU General Public License
  along with FlexiCrypt; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  

Author:
Sebastian, Dominik

Method Summary
static String firstLetterUpperCaseOfEachWord(String string)
           
static String getFormatedStringOfBytes(byte[] b, String type)
           
static String getStringOfByte(byte b)
           
static String lineBreakAfterNchars(String text, int breakAfter)
           
static String readFileIntoString(File file)
           
static void writeStringIntoFile(String text, File file)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

firstLetterUpperCaseOfEachWord

public static String firstLetterUpperCaseOfEachWord(String string)

lineBreakAfterNchars

public static String lineBreakAfterNchars(String text,
                                          int breakAfter)
Parameters:
string - - The String that will be broken up into lines of n chars
breakAfter - - The max. number of chars per line
Returns:
the broken string

getStringOfByte

public static String getStringOfByte(byte b)
Parameters:
b -
Returns:

getFormatedStringOfBytes

public static String getFormatedStringOfBytes(byte[] b,
                                              String type)

readFileIntoString

public static String readFileIntoString(File file)
                                 throws IOException
Throws:
IOException

writeStringIntoFile

public static void writeStringIntoFile(String text,
                                       File file)
                                throws IOException
Parameters:
text -
file -
Throws:
IOException