Package org.loboevolution.common
Class IORoutines
java.lang.Object
org.loboevolution.common.IORoutines
IORoutines class.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic InputStream
getInputStream
(URLConnection connection) getInputStream.static byte[]
load
(InputStream in, int initBufferSize) load.static String
loadAsText
(InputStream in, String encoding) Load as text.static String
loadAsText
(InputStream in, String encoding, int bufferSize) Load as text.
-
Constructor Details
-
IORoutines
public IORoutines()
-
-
Method Details
-
loadAsText
Load as text.- Parameters:
in
- the inencoding
- the encoding- Returns:
- the string
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
loadAsText
Load as text.- Parameters:
in
- the inencoding
- the encodingbufferSize
- the buffer size- Returns:
- the string
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
load
load.
- Parameters:
in
- aInputStream
object.initBufferSize
- aInteger
object.- Returns:
- an array of
invalid reference
byte
- Throws:
IOException
- if any.
-
getInputStream
getInputStream.
- Parameters:
connection
- aURLConnection
object.- Returns:
- a
InputStream
object. - Throws:
IOException
- if any.
-