JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.util
Class Streams

java.lang.Object
  |
  +--org.objectweb.jac.util.Streams

public class Streams
extends Object

This class contains some utility functions for streams.


Constructor Summary
Streams()
           
 
Method Summary
static byte[] readStream(InputStream fin)
          Reads an input stream until it reaches the end and store the data in an array of bytes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Streams

public Streams()
Method Detail

readStream

public static byte[] readStream(InputStream fin)
                         throws IOException
Reads an input stream until it reaches the end and store the data in an array of bytes.

this method was extracted "as is" from javassist 1.0 from Shigeru Chiba.

Javassist Homepage

Parameters:
fin - the input stream to read the class from
Returns:
the contents of that input stream
Throws:
IOException - if the size of the file is equal or more than 1Mbyte.

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli