|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.itextpdf.text.io.StreamUtil
public final class StreamUtil
Utility class with commonly used stream operations
Method Summary | |
---|---|
static void |
CopyBytes(RandomAccessSource source,
long start,
long length,
OutputStream outs)
|
static InputStream |
getResourceStream(String key)
Gets the resource's inputstream. |
static InputStream |
getResourceStream(String key,
ClassLoader loader)
Gets the resource's inputstream . |
static byte[] |
inputStreamToArray(InputStream is)
Reads the full content of a stream and returns them in a byte array |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static byte[] inputStreamToArray(InputStream is) throws IOException
is
- the stream to read
IOException
- if there is a problem reading from the input streampublic static void CopyBytes(RandomAccessSource source, long start, long length, OutputStream outs) throws IOException
IOException
public static InputStream getResourceStream(String key)
key
- the full name of the resource
InputStream
to get the resource or
null
if not foundpublic static InputStream getResourceStream(String key, ClassLoader loader)
key
- the full name of the resourceloader
- the ClassLoader to load the resource or null to try the ones available
InputStream
to get the resource or
null
if not found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |