public class DroolsStreamUtils extends Object
Constructor and Description |
---|
DroolsStreamUtils() |
Modifier and Type | Method and Description |
---|---|
static Object |
streamIn(byte[] bytes)
This method reads the contents from the given byte array and returns the object.
|
static Object |
streamIn(byte[] bytes,
boolean compressed)
This method reads the contents from the given byte array and returns the object.
|
static Object |
streamIn(byte[] bytes,
ClassLoader classLoader)
This method reads the contents from the given byte array and returns the object.
|
static Object |
streamIn(byte[] bytes,
ClassLoader classLoader,
boolean compressed)
This method reads the contents from the given byte array and returns the object.
|
static Object |
streamIn(InputStream in)
This method reads the contents from the given input stream and returns the object.
|
static Object |
streamIn(InputStream in,
ClassLoader classLoader)
This method reads the contents from the given input stream and returns the object.
|
static Object |
streamIn(InputStream in,
ClassLoader classLoader,
boolean compressed)
This method reads the contents from the given input stream and returns the object.
|
static byte[] |
streamOut(Object object)
This routine would stream out the give object uncompressed and store the streamed contents in
the return byte array.
|
static byte[] |
streamOut(Object object,
boolean compressed)
This routine would stream out the give object, uncompressed or compressed depending on the given flag,
and store the streamed contents in the return byte array.
|
static void |
streamOut(OutputStream out,
Object object)
This method would stream out the given object to the given output stream uncompressed.
|
static void |
streamOut(OutputStream out,
Object object,
boolean compressed)
This method would stream out the given object to the given output stream uncompressed or compressed
depending on the given flag.
|
public static byte[] streamOut(Object object) throws IOException
object
- IOException
public static byte[] streamOut(Object object, boolean compressed) throws IOException
object
- compressed
- IOException
public static void streamOut(OutputStream out, Object object) throws IOException
out
- object
- IOException
public static void streamOut(OutputStream out, Object object, boolean compressed) throws IOException
out
- object
- IOException
public static Object streamIn(byte[] bytes) throws IOException, ClassNotFoundException
bytes
- IOException
ClassNotFoundException
public static Object streamIn(byte[] bytes, ClassLoader classLoader) throws IOException, ClassNotFoundException
bytes
- classLoader
- IOException
ClassNotFoundException
public static Object streamIn(byte[] bytes, boolean compressed) throws IOException, ClassNotFoundException
bytes
- compressed
- IOException
ClassNotFoundException
public static Object streamIn(byte[] bytes, ClassLoader classLoader, boolean compressed) throws IOException, ClassNotFoundException
bytes
- classLoader
- compressed
- IOException
ClassNotFoundException
public static Object streamIn(InputStream in) throws IOException, ClassNotFoundException
in
- IOException
ClassNotFoundException
public static Object streamIn(InputStream in, ClassLoader classLoader) throws IOException, ClassNotFoundException
in
- classLoader
- IOException
ClassNotFoundException
public static Object streamIn(InputStream in, ClassLoader classLoader, boolean compressed) throws IOException, ClassNotFoundException
in
- IOException
ClassNotFoundException
Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.