public final class GeneralUtil
extends java.lang.Object
Constructor and Description |
---|
GeneralUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
colorToString(java.awt.Color color)
Return a string representation of a color
|
static java.lang.String |
encodeHTML(java.lang.String html)
This method will replace '&' with "&", '"' with """, '<' with "<" and '>' with ">".
|
static java.lang.String |
numberToPaddedHexString(int number,
int size)
Convert a number to a zero padded hex string
|
static java.awt.Color |
stringToColor(java.lang.String s)
Return a
Color object given a string representation of it |
public static java.lang.String encodeHTML(java.lang.String html)
html
- html to encodepublic static java.awt.Color stringToColor(java.lang.String s)
Color
object given a string representation of itcolor
- java.lang.IllegalArgumentException
- if string in bad formatpublic static java.lang.String colorToString(java.awt.Color color)
color
- public static java.lang.String numberToPaddedHexString(int number, int size)
int
- numberjava.lang.IllegalArgumentException
- if number takes up more characters than
size
Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.