writer2latex.util

Class Misc

public class Misc extends Object

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)
Method Summary
static Stringadd(String sLength1, String sLength2)
static int[]doubleIntArray(int[] array)
static StringgetAttribute(Node node, String attribute)
static StringgetAttribute(Element node, String attribute)
static ElementgetChildByTagName(Node node, String sTagName)
static ElementgetFirstChildElement(Node node)
static floatgetFloat(String sFloat, float fDefault)
static intgetIntegerFromHex(String sHex, int nDefault)
static StringgetPCDATA(Node node)
static intgetPosInteger(String sInteger, int nDefault)
static byte[]inputStreamToByteArray(InputStream is)

Read an InputStream into a bytearray

static Stringint2Alph(int number, boolean bLetterSync)
static Stringint2alph(int number, boolean bLetterSync)
static Stringint2arabic(int number)
static Stringint2roman(int number)
static Stringint2Roman(int number)
static booleanisElement(Node node)
static booleanisElement(Node node, String sTagName)
static booleanisLessThan(String sThis, String sThat)
static booleanisText(Node node)
static Stringlength2px(String sLength)
static StringmakeHref(String s)
static Stringmultiply(String sPercent, String sLength)
static StringremoveExtension(String sName)
static Stringsub(String sLength1, String sLength2)
static StringtrimDocumentName(String name, String extension)
static StringtruncateLength(String sValue)
static StringurlDecode(String s)
static StringurlEncode(String s)

Method Detail

add

public static final String add(String sLength1, String sLength2)

doubleIntArray

public static final int[] doubleIntArray(int[] array)

getAttribute

public static final String getAttribute(Node node, String attribute)

getAttribute

public static final String getAttribute(Element 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)

Read an InputStream into a bytearray

Parameters: is the InputStream to read

Returns: a byte array with the contents read from the stream

Throws: IOException in case of any I/O errors.

int2Alph

public static final String int2Alph(int number, boolean bLetterSync)

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)

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)