com.hammingweight.hammock.mocks.io
Class MockByteArrayInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.ByteArrayInputStream
          extended by com.hammingweight.hammock.mocks.io.MockByteArrayInputStream
All Implemented Interfaces:
IMockObject

public class MockByteArrayInputStream
extends java.io.ByteArrayInputStream
implements IMockObject


Field Summary
static MockMethod MTHD_AVAILABLE
           
static MockMethod MTHD_CLOSE
           
static MockMethod MTHD_MARK_$_INT
           
static MockMethod MTHD_MARK_SUPPORTED
           
static MockMethod MTHD_READ
           
static MockMethod MTHD_READ_$_ARRAY_BYTE
           
static MockMethod MTHD_READ_$_ARRAY_BYTE_INT_INT
           
static MockMethod MTHD_RESET
           
static MockMethod MTHD_SKIP_$_LONG
           
 
Fields inherited from class java.io.ByteArrayInputStream
buf, count, mark, pos
 
Constructor Summary
MockByteArrayInputStream(byte[] arg0)
           
MockByteArrayInputStream(byte[] arg0, IInvocationHandler handler)
           
MockByteArrayInputStream(byte[] arg0, int arg1, int arg2)
           
MockByteArrayInputStream(byte[] arg0, int arg1, int arg2, IInvocationHandler handler)
           
 
Method Summary
 int available()
           
 void close()
           
 IInvocationHandler getInvocationHandler()
          Gets the invocation handler that the mock object uses to evaluate method invocations.
 void mark(int arg0)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] arg0)
           
 int read(byte[] arg0, int arg1, int arg2)
           
 void reset()
           
 void setInvocationHandler(IInvocationHandler handler)
          Sets the invocation handler that the mock object should use to evaluate method invocations.
 long skip(long arg0)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MTHD_AVAILABLE

public static final MockMethod MTHD_AVAILABLE

MTHD_CLOSE

public static final MockMethod MTHD_CLOSE

MTHD_MARK_$_INT

public static final MockMethod MTHD_MARK_$_INT

MTHD_MARK_SUPPORTED

public static final MockMethod MTHD_MARK_SUPPORTED

MTHD_READ

public static final MockMethod MTHD_READ

MTHD_READ_$_ARRAY_BYTE

public static final MockMethod MTHD_READ_$_ARRAY_BYTE

MTHD_READ_$_ARRAY_BYTE_INT_INT

public static final MockMethod MTHD_READ_$_ARRAY_BYTE_INT_INT

MTHD_RESET

public static final MockMethod MTHD_RESET

MTHD_SKIP_$_LONG

public static final MockMethod MTHD_SKIP_$_LONG
Constructor Detail

MockByteArrayInputStream

public MockByteArrayInputStream(byte[] arg0,
                                int arg1,
                                int arg2)

MockByteArrayInputStream

public MockByteArrayInputStream(byte[] arg0,
                                int arg1,
                                int arg2,
                                IInvocationHandler handler)

MockByteArrayInputStream

public MockByteArrayInputStream(byte[] arg0)

MockByteArrayInputStream

public MockByteArrayInputStream(byte[] arg0,
                                IInvocationHandler handler)
Method Detail

setInvocationHandler

public final void setInvocationHandler(IInvocationHandler handler)
Description copied from interface: IMockObject
Sets the invocation handler that the mock object should use to evaluate method invocations.

Specified by:
setInvocationHandler in interface IMockObject
Parameters:
handler - The invocation handler to be used by the mock object.

getInvocationHandler

public final IInvocationHandler getInvocationHandler()
Description copied from interface: IMockObject
Gets the invocation handler that the mock object uses to evaluate method invocations.

Specified by:
getInvocationHandler in interface IMockObject
Returns:
The invocation handler used by the mock object.

available

public int available()
Overrides:
available in class java.io.ByteArrayInputStream

close

public void close()
           throws java.io.IOException
Overrides:
close in class java.io.ByteArrayInputStream
Throws:
java.io.IOException

mark

public void mark(int arg0)
Overrides:
mark in class java.io.ByteArrayInputStream

markSupported

public boolean markSupported()
Overrides:
markSupported in class java.io.ByteArrayInputStream

read

public int read()
Overrides:
read in class java.io.ByteArrayInputStream

read

public int read(byte[] arg0)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] arg0,
                int arg1,
                int arg2)
Overrides:
read in class java.io.ByteArrayInputStream

reset

public void reset()
Overrides:
reset in class java.io.ByteArrayInputStream

skip

public long skip(long arg0)
Overrides:
skip in class java.io.ByteArrayInputStream