com.itextpdf.text.io
Class StreamUtil

java.lang.Object
  extended by com.itextpdf.text.io.StreamUtil

public final class StreamUtil
extends java.lang.Object

Utility class with commonly used stream operations

Since:
5.3.5

Method Summary
static void CopyBytes(RandomAccessSource source, long start, long length, java.io.OutputStream outs)
           
static byte[] inputStreamToArray(java.io.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

inputStreamToArray

public static byte[] inputStreamToArray(java.io.InputStream is)
                                 throws java.io.IOException
Reads the full content of a stream and returns them in a byte array

Parameters:
is - the stream to read
Returns:
a byte array containing all of the bytes from the stream
Throws:
java.io.IOException - if there is a problem reading from the input stream

CopyBytes

public static void CopyBytes(RandomAccessSource source,
                             long start,
                             long length,
                             java.io.OutputStream outs)
                      throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2013. All Rights Reserved.