com.canoo.webtest.boundary
Class StreamBoundary

java.lang.Object
  extended by com.canoo.webtest.boundary.StreamBoundary

public final class StreamBoundary
extends Object

Helper class for working with streams.

Author:
Paul King

Method Summary
static void closeInputStream(InputStream inStream)
          Close an InputStream ignoring an errors.
static void closeOutputStream(OutputStream outStream)
          Close an OutputStream ignoring an errors.
static void tryCloseInputStreamWithFail(InputStream is, Step step)
          Close an InputStream and abort step if an error occur.
static void tryCloseOutputStream(OutputStream os, Step step)
          Close an OutputStream and abort step if an error occur.
static byte[] tryGetBytes(Context context, Step step)
           
static Object tryReadObject(ObjectInputStream ois, Step step)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

closeInputStream

public static void closeInputStream(InputStream inStream)
Close an InputStream ignoring an errors. Wraps IOException's.

Parameters:
inStream -

closeOutputStream

public static void closeOutputStream(OutputStream outStream)
Close an OutputStream ignoring an errors. Wraps IOException's.

Parameters:
outStream -

tryCloseInputStreamWithFail

public static void tryCloseInputStreamWithFail(InputStream is,
                                               Step step)
Close an InputStream and abort step if an error occur. Wraps IOException's.

Parameters:
is -
step -

tryCloseOutputStream

public static void tryCloseOutputStream(OutputStream os,
                                        Step step)
Close an OutputStream and abort step if an error occur. Wraps IOException's.

Parameters:
os -
step -

tryReadObject

public static Object tryReadObject(ObjectInputStream ois,
                                   Step step)
                            throws IOException
Throws:
IOException

tryGetBytes

public static byte[] tryGetBytes(Context context,
                                 Step step)

Copyright © 2001-2007 Canoo Engineering AG, Basel. All rights reserved.