Package de.undercouch.citeproc.helper
Class CSLUtils
- java.lang.Object
-
- de.undercouch.citeproc.helper.CSLUtils
-
public class CSLUtils extends java.lang.ObjectUtilities for the CSL processor- Author:
- Michel Kraemer
-
-
Constructor Summary
Constructors Constructor Description CSLUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringreadStreamToString(java.io.InputStream is, java.lang.String encoding)Reads a string from a stream.static java.lang.StringreadURLToString(java.net.URL u, java.lang.String encoding)Reads a string from a URL
-
-
-
Method Detail
-
readURLToString
public static java.lang.String readURLToString(java.net.URL u, java.lang.String encoding) throws java.io.IOExceptionReads a string from a URL- Parameters:
u- the URLencoding- the character encoding- Returns:
- the string
- Throws:
java.io.IOException- if the URL contents could not be read
-
readStreamToString
public static java.lang.String readStreamToString(java.io.InputStream is, java.lang.String encoding) throws java.io.IOExceptionReads a string from a stream. Closes the stream after reading.- Parameters:
is- the streamencoding- the character encoding- Returns:
- the string
- Throws:
java.io.IOException- if the stream contents could not be read
-
-