Package writer2latex.util
Class Misc
java.lang.Object
writer2latex.util.Misc
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final int[]doubleIntArray(int[] array) static final StringformatDate(String sDate, String sLanguage, String sCountry) static final StringgetAttribute(Element node, String attribute) static final StringgetAttribute(Node node, String attribute) static final ElementgetChildByTagName(Node node, String sTagName) static final StringgetFileExtension(String sURL) Get the file extension from an URLstatic final StringgetFileName(String sURL) Get the file name part of an URLstatic final ElementgetFirstChildElement(Node node) static final floatstatic final intgetIntegerFromHex(String sHex, int nDefault) static Stringstatic final intgetPosInteger(String sInteger, int nDefault) static byte[]Read anInputStreaminto abytearraystatic final Stringint2alph(int number, boolean bLetterSync) static final Stringint2Alph(int number, boolean bLetterSync) static final Stringint2arabic(int number) static final Stringint2roman(int number) static final Stringint2Roman(int number) static final booleanstatic final booleanstatic booleanisLessThan(String sThis, String sThat) static final booleanstatic booleanstatic final Stringstatic StringmakeFileName(String sURL) static Stringstatic final Stringstatic final StringremoveExtension(String sName) static String[]sortStringSet(Set<String> theSet) static final Stringstatic final StringtrimDocumentName(String name, String extension) static StringtruncateLength(String sValue) static Stringstatic String
-
Constructor Details
-
Misc
public Misc()
-
-
Method Details
-
doubleIntArray
public static final int[] doubleIntArray(int[] array) -
dateOnly
-
formatDate
-
int2roman
-
int2Roman
-
int2arabic
-
int2alph
-
int2Alph
-
getPosInteger
-
getFloat
-
getIntegerFromHex
-
truncateLength
-
isZero
-
length2px
-
divide
-
divide
-
multiply
-
add
-
sub
-
isLessThan
-
abs
-
trimDocumentName
-
getFileName
Get the file name part of an URL- Parameters:
sURL- the URL from which the filename should be extracted- Returns:
- the file name
-
getFileExtension
Get the file extension from an URL- Parameters:
sURL-- Returns:
- the file extension (including dot) or the empty string if there is no file extension
-
removeExtension
-
getAttribute
-
isElement
-
isElement
-
isText
-
getAttribute
-
getChildByTagName
-
getFirstChildElement
-
getPCDATA
-
sortStringSet
-
urlEncode
-
urlDecode
-
makeHref
-
makeFileName
-
inputStreamToByteArray
Read an
InputStreaminto abytearray- Parameters:
is- theInputStreamto read- Returns:
- a byte array with the contents read from the stream
- Throws:
IOException- in case of any I/O errors.
-