Misc.java
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License version 2.1, as published by the Free Software Foundation.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston,
MA 02111-1307 USA
Copyright: 2002-2007 by Henrik Just
All Rights Reserved.
Version 0.4.2 (2007-04-02)
add
public static final String add(String sLength1,
String sLength2)
doubleIntArray
public static final int[] doubleIntArray(int[] array)
getAttribute
public static final String getAttribute(Element node,
String attribute)
getAttribute
public static final String getAttribute(Node node,
String attribute)
getChildByTagName
public static final Element getChildByTagName(Node node,
String sTagName)
getFirstChildElement
public static final Element getFirstChildElement(Node node)
getFloat
public static final float getFloat(String sFloat,
float fDefault)
getIntegerFromHex
public static final int getIntegerFromHex(String sHex,
int nDefault)
getPCDATA
public static String getPCDATA(Node node)
getPosInteger
public static final int getPosInteger(String sInteger,
int nDefault)
inputStreamToByteArray
public static byte[] inputStreamToByteArray(InputStream is)
throws IOException
Read an InputStream
into a byte
array
is
- the InputStream
to read
- a byte array with the contents read from the stream
int2Alph
public static final String int2Alph(int number,
boolean bLetterSync)
int2Roman
public static final String int2Roman(int number)
int2alph
public static final String int2alph(int number,
boolean bLetterSync)
int2arabic
public static final String int2arabic(int number)
int2roman
public static final String int2roman(int number)
isElement
public static final boolean isElement(Node node)
isElement
public static final boolean isElement(Node node,
String sTagName)
isLessThan
public static boolean isLessThan(String sThis,
String sThat)
isText
public static final boolean isText(Node node)
length2px
public static final String length2px(String sLength)
makeHref
public static String makeHref(String s)
multiply
public static final String multiply(String sPercent,
String sLength)
removeExtension
public static final String removeExtension(String sName)
sub
public static final String sub(String sLength1,
String sLength2)
trimDocumentName
public static final String trimDocumentName(String name,
String extension)
truncateLength
public static String truncateLength(String sValue)
urlDecode
public static String urlDecode(String s)
urlEncode
public static String urlEncode(String s)