com.hammingweight.hammock.mocks.io
Class MockDataOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.DataOutputStream
          extended by com.hammingweight.hammock.mocks.io.MockDataOutputStream
All Implemented Interfaces:
IMockObject, java.io.DataOutput

public class MockDataOutputStream
extends java.io.DataOutputStream
implements IMockObject


Field Summary
static MockMethod MTHD_CLOSE
           
static MockMethod MTHD_FLUSH
           
static MockMethod MTHD_WRITE_$_ARRAY_BYTE
           
static MockMethod MTHD_WRITE_$_ARRAY_BYTE_INT_INT
           
static MockMethod MTHD_WRITE_$_INT
           
 
Fields inherited from class java.io.DataOutputStream
out
 
Constructor Summary
MockDataOutputStream(java.io.OutputStream arg0)
           
MockDataOutputStream(java.io.OutputStream arg0, IInvocationHandler handler)
           
 
Method Summary
 void close()
           
 void flush()
           
 IInvocationHandler getInvocationHandler()
          Gets the invocation handler that the mock object uses to evaluate method invocations.
 void setInvocationHandler(IInvocationHandler handler)
          Sets the invocation handler that the mock object should use to evaluate method invocations.
 void write(byte[] arg0)
           
 void write(byte[] arg0, int arg1, int arg2)
           
 void write(int arg0)
           
 
Methods inherited from class java.io.DataOutputStream
writeBoolean, writeByte, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MTHD_CLOSE

public static final MockMethod MTHD_CLOSE

MTHD_FLUSH

public static final MockMethod MTHD_FLUSH

MTHD_WRITE_$_ARRAY_BYTE

public static final MockMethod MTHD_WRITE_$_ARRAY_BYTE

MTHD_WRITE_$_ARRAY_BYTE_INT_INT

public static final MockMethod MTHD_WRITE_$_ARRAY_BYTE_INT_INT

MTHD_WRITE_$_INT

public static final MockMethod MTHD_WRITE_$_INT
Constructor Detail

MockDataOutputStream

public MockDataOutputStream(java.io.OutputStream arg0)

MockDataOutputStream

public MockDataOutputStream(java.io.OutputStream 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.

close

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

flush

public void flush()
           throws java.io.IOException
Overrides:
flush in class java.io.DataOutputStream
Throws:
java.io.IOException

write

public void write(byte[] arg0)
           throws java.io.IOException
Specified by:
write in interface java.io.DataOutput
Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(byte[] arg0,
                  int arg1,
                  int arg2)
           throws java.io.IOException
Specified by:
write in interface java.io.DataOutput
Overrides:
write in class java.io.DataOutputStream
Throws:
java.io.IOException

write

public void write(int arg0)
           throws java.io.IOException
Specified by:
write in interface java.io.DataOutput
Overrides:
write in class java.io.DataOutputStream
Throws:
java.io.IOException