qflib 0.99

de.qfs.lib.util
Class StreamInput

java.lang.Object
  extended byde.qfs.lib.util.StreamInput

public class StreamInput
extends java.lang.Object

Helper to read all bytes from a stream into a byte array.

Author:
Gregor Schmid

Constructor Summary
StreamInput()
           
 
Method Summary
static byte[] read(java.io.InputStream in)
          Read all bytes from a stream into a byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamInput

public StreamInput()
Method Detail

read

public static byte[] read(java.io.InputStream in)
                   throws java.io.IOException
Read all bytes from a stream into a byte array. Should only be used when the input stream is known to be limited to a reasonable size.

Parameters:
in - The input stream.
Returns:
The byte array.
Throws:
java.io.IOException - If an I/O error occurs.

qflib 0.99