|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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 stream
public static void CopyBytes(RandomAccessSource source,
long start,
long length,
OutputStream outs)
throws IOException
IOExceptionpublic static InputStream getResourceStream(String key)
key - the full name of the resource
InputStream to get the resource or
null if not found
public 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 | |||||||||