com.hammingweight.hammock.mocks.microedition.io
Class MockDatagram

java.lang.Object
  extended by com.hammingweight.hammock.AMockObject
      extended by com.hammingweight.hammock.mocks.microedition.io.MockDatagram
All Implemented Interfaces:
IHammockExceptionErrors, IMockObject, java.io.DataInput, java.io.DataOutput, javax.microedition.io.Datagram

public class MockDatagram
extends AMockObject
implements javax.microedition.io.Datagram


Field Summary
static MockMethod MTHD_GET_ADDRESS
           
static MockMethod MTHD_GET_DATA
           
static MockMethod MTHD_GET_LENGTH
           
static MockMethod MTHD_GET_OFFSET
           
static MockMethod MTHD_READ_BOOLEAN
           
static MockMethod MTHD_READ_BYTE
           
static MockMethod MTHD_READ_CHAR
           
static MockMethod MTHD_READ_DOUBLE
           
static MockMethod MTHD_READ_FLOAT
           
static MockMethod MTHD_READ_FULLY_$_ARRAY_BYTE
           
static MockMethod MTHD_READ_FULLY_$_ARRAY_BYTE_INT_INT
           
static MockMethod MTHD_READ_INT
           
static MockMethod MTHD_READ_LINE
           
static MockMethod MTHD_READ_LONG
           
static MockMethod MTHD_READ_SHORT
           
static MockMethod MTHD_READ_UNSIGNED_BYTE
           
static MockMethod MTHD_READ_UNSIGNED_SHORT
           
static MockMethod MTHD_READ_UTF
           
static MockMethod MTHD_RESET
           
static MockMethod MTHD_SET_ADDRESS_$_DATAGRAM
           
static MockMethod MTHD_SET_ADDRESS_$_STRING
           
static MockMethod MTHD_SET_DATA_$_ARRAY_BYTE_INT_INT
           
static MockMethod MTHD_SET_LENGTH_$_INT
           
static MockMethod MTHD_SKIP_BYTES_$_INT
           
static MockMethod MTHD_WRITE_$_ARRAY_BYTE
           
static MockMethod MTHD_WRITE_$_ARRAY_BYTE_INT_INT
           
static MockMethod MTHD_WRITE_$_INT
           
static MockMethod MTHD_WRITE_BOOLEAN_$_BOOLEAN
           
static MockMethod MTHD_WRITE_BYTE_$_INT
           
static MockMethod MTHD_WRITE_BYTES_$_STRING
           
static MockMethod MTHD_WRITE_CHAR_$_INT
           
static MockMethod MTHD_WRITE_CHARS_$_STRING
           
static MockMethod MTHD_WRITE_DOUBLE_$_DOUBLE
           
static MockMethod MTHD_WRITE_FLOAT_$_FLOAT
           
static MockMethod MTHD_WRITE_INT_$_INT
           
static MockMethod MTHD_WRITE_LONG_$_LONG
           
static MockMethod MTHD_WRITE_SHORT_$_INT
           
static MockMethod MTHD_WRITE_UTF_$_STRING
           
 
Fields inherited from interface com.hammingweight.hammock.IHammockExceptionErrors
ARGUMENT_MATCHER_ALREADY_SET, CANT_SET_VOID_RETURN_VALUE, CLASS_IS_NOT_THROWABLE, DOES_NOT_SUBCLASS_MOCK_OBJECT, HANDLER_NOT_SET, INCORRECT_MOCK_OBJECT, INCORRECT_RETURN_CLASS, INCORRECT_THROWABLE_CLASS, METHOD_CANNOT_BE_EVALUATED, METHOD_INVOKED_OUT_OF_SEQUENCE, METHOD_INVOKED_TOO_MANY_TIMES, METHOD_INVOKED_UNEXPECTED_NUMBER_OF_TIMES, NO_RETURN_VALUE, NO_RETURN_VALUE_SET, NUM_INVOCATIONS_ALREADY_SET, RETURN_VALUE_ALREADY_SET, WRONG_ARGUMENT_CLASS, WRONG_NUMBER_OF_ARGS
 
Constructor Summary
MockDatagram()
           
MockDatagram(IInvocationHandler handler)
           
 
Method Summary
 java.lang.String getAddress()
           
 byte[] getData()
           
 int getLength()
           
 int getOffset()
           
 boolean readBoolean()
           
 byte readByte()
           
 char readChar()
           
 double readDouble()
           
 float readFloat()
           
 void readFully(byte[] arg0)
           
 void readFully(byte[] arg0, int arg1, int arg2)
           
 int readInt()
           
 java.lang.String readLine()
           
 long readLong()
           
 short readShort()
           
 int readUnsignedByte()
           
 int readUnsignedShort()
           
 java.lang.String readUTF()
           
 void reset()
           
 void setAddress(javax.microedition.io.Datagram arg0)
           
 void setAddress(java.lang.String arg0)
           
 void setData(byte[] arg0, int arg1, int arg2)
           
 void setLength(int arg0)
           
 int skipBytes(int arg0)
           
 void write(byte[] arg0)
           
 void write(byte[] arg0, int arg1, int arg2)
           
 void write(int arg0)
           
 void writeBoolean(boolean arg0)
           
 void writeByte(int arg0)
           
 void writeBytes(java.lang.String arg0)
           
 void writeChar(int arg0)
           
 void writeChars(java.lang.String arg0)
           
 void writeDouble(double arg0)
           
 void writeFloat(float arg0)
           
 void writeInt(int arg0)
           
 void writeLong(long arg0)
           
 void writeShort(int arg0)
           
 void writeUTF(java.lang.String arg0)
           
 
Methods inherited from class com.hammingweight.hammock.AMockObject
assertReturnNotNull, getInvocationHandler, setInvocationHandler
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MTHD_GET_ADDRESS

public static final MockMethod MTHD_GET_ADDRESS

MTHD_GET_DATA

public static final MockMethod MTHD_GET_DATA

MTHD_GET_LENGTH

public static final MockMethod MTHD_GET_LENGTH

MTHD_GET_OFFSET

public static final MockMethod MTHD_GET_OFFSET

MTHD_READ_BOOLEAN

public static final MockMethod MTHD_READ_BOOLEAN

MTHD_READ_BYTE

public static final MockMethod MTHD_READ_BYTE

MTHD_READ_CHAR

public static final MockMethod MTHD_READ_CHAR

MTHD_READ_DOUBLE

public static final MockMethod MTHD_READ_DOUBLE

MTHD_READ_FLOAT

public static final MockMethod MTHD_READ_FLOAT

MTHD_READ_FULLY_$_ARRAY_BYTE

public static final MockMethod MTHD_READ_FULLY_$_ARRAY_BYTE

MTHD_READ_FULLY_$_ARRAY_BYTE_INT_INT

public static final MockMethod MTHD_READ_FULLY_$_ARRAY_BYTE_INT_INT

MTHD_READ_INT

public static final MockMethod MTHD_READ_INT

MTHD_READ_LINE

public static final MockMethod MTHD_READ_LINE

MTHD_READ_LONG

public static final MockMethod MTHD_READ_LONG

MTHD_READ_SHORT

public static final MockMethod MTHD_READ_SHORT

MTHD_READ_UNSIGNED_BYTE

public static final MockMethod MTHD_READ_UNSIGNED_BYTE

MTHD_READ_UNSIGNED_SHORT

public static final MockMethod MTHD_READ_UNSIGNED_SHORT

MTHD_READ_UTF

public static final MockMethod MTHD_READ_UTF

MTHD_RESET

public static final MockMethod MTHD_RESET

MTHD_SET_ADDRESS_$_DATAGRAM

public static final MockMethod MTHD_SET_ADDRESS_$_DATAGRAM

MTHD_SET_ADDRESS_$_STRING

public static final MockMethod MTHD_SET_ADDRESS_$_STRING

MTHD_SET_DATA_$_ARRAY_BYTE_INT_INT

public static final MockMethod MTHD_SET_DATA_$_ARRAY_BYTE_INT_INT

MTHD_SET_LENGTH_$_INT

public static final MockMethod MTHD_SET_LENGTH_$_INT

MTHD_SKIP_BYTES_$_INT

public static final MockMethod MTHD_SKIP_BYTES_$_INT

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

MTHD_WRITE_BOOLEAN_$_BOOLEAN

public static final MockMethod MTHD_WRITE_BOOLEAN_$_BOOLEAN

MTHD_WRITE_BYTES_$_STRING

public static final MockMethod MTHD_WRITE_BYTES_$_STRING

MTHD_WRITE_BYTE_$_INT

public static final MockMethod MTHD_WRITE_BYTE_$_INT

MTHD_WRITE_CHARS_$_STRING

public static final MockMethod MTHD_WRITE_CHARS_$_STRING

MTHD_WRITE_CHAR_$_INT

public static final MockMethod MTHD_WRITE_CHAR_$_INT

MTHD_WRITE_DOUBLE_$_DOUBLE

public static final MockMethod MTHD_WRITE_DOUBLE_$_DOUBLE

MTHD_WRITE_FLOAT_$_FLOAT

public static final MockMethod MTHD_WRITE_FLOAT_$_FLOAT

MTHD_WRITE_INT_$_INT

public static final MockMethod MTHD_WRITE_INT_$_INT

MTHD_WRITE_LONG_$_LONG

public static final MockMethod MTHD_WRITE_LONG_$_LONG

MTHD_WRITE_SHORT_$_INT

public static final MockMethod MTHD_WRITE_SHORT_$_INT

MTHD_WRITE_UTF_$_STRING

public static final MockMethod MTHD_WRITE_UTF_$_STRING
Constructor Detail

MockDatagram

public MockDatagram()

MockDatagram

public MockDatagram(IInvocationHandler handler)
Method Detail

getAddress

public java.lang.String getAddress()
Specified by:
getAddress in interface javax.microedition.io.Datagram

getData

public byte[] getData()
Specified by:
getData in interface javax.microedition.io.Datagram

getLength

public int getLength()
Specified by:
getLength in interface javax.microedition.io.Datagram

getOffset

public int getOffset()
Specified by:
getOffset in interface javax.microedition.io.Datagram

readBoolean

public boolean readBoolean()
                    throws java.io.IOException
Specified by:
readBoolean in interface java.io.DataInput
Throws:
java.io.IOException

readByte

public byte readByte()
              throws java.io.IOException
Specified by:
readByte in interface java.io.DataInput
Throws:
java.io.IOException

readChar

public char readChar()
              throws java.io.IOException
Specified by:
readChar in interface java.io.DataInput
Throws:
java.io.IOException

readDouble

public double readDouble()
                  throws java.io.IOException
Specified by:
readDouble in interface java.io.DataInput
Throws:
java.io.IOException

readFloat

public float readFloat()
                throws java.io.IOException
Specified by:
readFloat in interface java.io.DataInput
Throws:
java.io.IOException

readFully

public void readFully(byte[] arg0)
               throws java.io.IOException
Specified by:
readFully in interface java.io.DataInput
Throws:
java.io.IOException

readFully

public void readFully(byte[] arg0,
                      int arg1,
                      int arg2)
               throws java.io.IOException
Specified by:
readFully in interface java.io.DataInput
Throws:
java.io.IOException

readInt

public int readInt()
            throws java.io.IOException
Specified by:
readInt in interface java.io.DataInput
Throws:
java.io.IOException

readLine

public java.lang.String readLine()
                          throws java.io.IOException
Throws:
java.io.IOException

readLong

public long readLong()
              throws java.io.IOException
Specified by:
readLong in interface java.io.DataInput
Throws:
java.io.IOException

readShort

public short readShort()
                throws java.io.IOException
Specified by:
readShort in interface java.io.DataInput
Throws:
java.io.IOException

readUnsignedByte

public int readUnsignedByte()
                     throws java.io.IOException
Specified by:
readUnsignedByte in interface java.io.DataInput
Throws:
java.io.IOException

readUnsignedShort

public int readUnsignedShort()
                      throws java.io.IOException
Specified by:
readUnsignedShort in interface java.io.DataInput
Throws:
java.io.IOException

readUTF

public java.lang.String readUTF()
                         throws java.io.IOException
Specified by:
readUTF in interface java.io.DataInput
Throws:
java.io.IOException

reset

public void reset()
Specified by:
reset in interface javax.microedition.io.Datagram

setAddress

public void setAddress(javax.microedition.io.Datagram arg0)
Specified by:
setAddress in interface javax.microedition.io.Datagram

setAddress

public void setAddress(java.lang.String arg0)
                throws java.io.IOException
Specified by:
setAddress in interface javax.microedition.io.Datagram
Throws:
java.io.IOException

setData

public void setData(byte[] arg0,
                    int arg1,
                    int arg2)
Specified by:
setData in interface javax.microedition.io.Datagram

setLength

public void setLength(int arg0)
Specified by:
setLength in interface javax.microedition.io.Datagram

skipBytes

public int skipBytes(int arg0)
              throws java.io.IOException
Specified by:
skipBytes in interface java.io.DataInput
Throws:
java.io.IOException

write

public void write(byte[] arg0)
           throws java.io.IOException
Specified by:
write in interface java.io.DataOutput
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
Throws:
java.io.IOException

write

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

writeBoolean

public void writeBoolean(boolean arg0)
                  throws java.io.IOException
Specified by:
writeBoolean in interface java.io.DataOutput
Throws:
java.io.IOException

writeBytes

public void writeBytes(java.lang.String arg0)
                throws java.io.IOException
Throws:
java.io.IOException

writeByte

public void writeByte(int arg0)
               throws java.io.IOException
Specified by:
writeByte in interface java.io.DataOutput
Throws:
java.io.IOException

writeChars

public void writeChars(java.lang.String arg0)
                throws java.io.IOException
Specified by:
writeChars in interface java.io.DataOutput
Throws:
java.io.IOException

writeChar

public void writeChar(int arg0)
               throws java.io.IOException
Specified by:
writeChar in interface java.io.DataOutput
Throws:
java.io.IOException

writeDouble

public void writeDouble(double arg0)
                 throws java.io.IOException
Specified by:
writeDouble in interface java.io.DataOutput
Throws:
java.io.IOException

writeFloat

public void writeFloat(float arg0)
                throws java.io.IOException
Specified by:
writeFloat in interface java.io.DataOutput
Throws:
java.io.IOException

writeInt

public void writeInt(int arg0)
              throws java.io.IOException
Specified by:
writeInt in interface java.io.DataOutput
Throws:
java.io.IOException

writeLong

public void writeLong(long arg0)
               throws java.io.IOException
Specified by:
writeLong in interface java.io.DataOutput
Throws:
java.io.IOException

writeShort

public void writeShort(int arg0)
                throws java.io.IOException
Specified by:
writeShort in interface java.io.DataOutput
Throws:
java.io.IOException

writeUTF

public void writeUTF(java.lang.String arg0)
              throws java.io.IOException
Specified by:
writeUTF in interface java.io.DataOutput
Throws:
java.io.IOException