com.hammingweight.hammock.mocks.microedition.io.file
Class MockFileConnection

java.lang.Object
  extended by com.hammingweight.hammock.AMockObject
      extended by com.hammingweight.hammock.mocks.microedition.io.file.MockFileConnection
All Implemented Interfaces:
IHammockExceptionErrors, IMockObject, javax.microedition.io.Connection, javax.microedition.io.file.FileConnection, javax.microedition.io.InputConnection, javax.microedition.io.OutputConnection, javax.microedition.io.StreamConnection

public class MockFileConnection
extends AMockObject
implements javax.microedition.io.file.FileConnection


Field Summary
static MockMethod MTHD_AVAILABLE_SIZE
           
static MockMethod MTHD_CAN_READ
           
static MockMethod MTHD_CAN_WRITE
           
static MockMethod MTHD_CLOSE
           
static MockMethod MTHD_CREATE
           
static MockMethod MTHD_DELETE
           
static MockMethod MTHD_DIRECTORY_SIZE_$_BOOLEAN
           
static MockMethod MTHD_EXISTS
           
static MockMethod MTHD_FILE_SIZE
           
static MockMethod MTHD_GET_NAME
           
static MockMethod MTHD_GET_PATH
           
static MockMethod MTHD_GET_URL
           
static MockMethod MTHD_IS_DIRECTORY
           
static MockMethod MTHD_IS_HIDDEN
           
static MockMethod MTHD_IS_OPEN
           
static MockMethod MTHD_LAST_MODIFIED
           
static MockMethod MTHD_LIST
           
static MockMethod MTHD_LIST_$_STRING_BOOLEAN
           
static MockMethod MTHD_MKDIR
           
static MockMethod MTHD_OPEN_DATA_INPUT_STREAM
           
static MockMethod MTHD_OPEN_DATA_OUTPUT_STREAM
           
static MockMethod MTHD_OPEN_INPUT_STREAM
           
static MockMethod MTHD_OPEN_OUTPUT_STREAM
           
static MockMethod MTHD_OPEN_OUTPUT_STREAM_$_LONG
           
static MockMethod MTHD_RENAME_$_STRING
           
static MockMethod MTHD_SET_FILE_CONNECTION_$_STRING
           
static MockMethod MTHD_SET_HIDDEN_$_BOOLEAN
           
static MockMethod MTHD_SET_READABLE_$_BOOLEAN
           
static MockMethod MTHD_SET_WRITABLE_$_BOOLEAN
           
static MockMethod MTHD_TOTAL_SIZE
           
static MockMethod MTHD_TRUNCATE_$_LONG
           
static MockMethod MTHD_USED_SIZE
           
 
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
MockFileConnection()
           
MockFileConnection(IInvocationHandler handler)
           
 
Method Summary
 long availableSize()
           
 boolean canRead()
           
 boolean canWrite()
           
 void close()
           
 void create()
           
 void delete()
           
 long directorySize(boolean arg0)
           
 boolean exists()
           
 long fileSize()
           
 java.lang.String getName()
           
 java.lang.String getPath()
           
 java.lang.String getURL()
           
 boolean isDirectory()
           
 boolean isHidden()
           
 boolean isOpen()
           
 long lastModified()
           
 java.util.Enumeration list()
           
 java.util.Enumeration list(java.lang.String arg0, boolean arg1)
           
 void mkdir()
           
 java.io.DataInputStream openDataInputStream()
           
 java.io.DataOutputStream openDataOutputStream()
           
 java.io.InputStream openInputStream()
           
 java.io.OutputStream openOutputStream()
           
 java.io.OutputStream openOutputStream(long arg0)
           
 void rename(java.lang.String arg0)
           
 void setFileConnection(java.lang.String arg0)
           
 void setHidden(boolean arg0)
           
 void setReadable(boolean arg0)
           
 void setWritable(boolean arg0)
           
 long totalSize()
           
 void truncate(long arg0)
           
 long usedSize()
           
 
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_AVAILABLE_SIZE

public static final MockMethod MTHD_AVAILABLE_SIZE

MTHD_CAN_READ

public static final MockMethod MTHD_CAN_READ

MTHD_CAN_WRITE

public static final MockMethod MTHD_CAN_WRITE

MTHD_CLOSE

public static final MockMethod MTHD_CLOSE

MTHD_CREATE

public static final MockMethod MTHD_CREATE

MTHD_DELETE

public static final MockMethod MTHD_DELETE

MTHD_DIRECTORY_SIZE_$_BOOLEAN

public static final MockMethod MTHD_DIRECTORY_SIZE_$_BOOLEAN

MTHD_EXISTS

public static final MockMethod MTHD_EXISTS

MTHD_FILE_SIZE

public static final MockMethod MTHD_FILE_SIZE

MTHD_GET_NAME

public static final MockMethod MTHD_GET_NAME

MTHD_GET_PATH

public static final MockMethod MTHD_GET_PATH

MTHD_GET_URL

public static final MockMethod MTHD_GET_URL

MTHD_IS_DIRECTORY

public static final MockMethod MTHD_IS_DIRECTORY

MTHD_IS_HIDDEN

public static final MockMethod MTHD_IS_HIDDEN

MTHD_IS_OPEN

public static final MockMethod MTHD_IS_OPEN

MTHD_LAST_MODIFIED

public static final MockMethod MTHD_LAST_MODIFIED

MTHD_LIST

public static final MockMethod MTHD_LIST

MTHD_LIST_$_STRING_BOOLEAN

public static final MockMethod MTHD_LIST_$_STRING_BOOLEAN

MTHD_MKDIR

public static final MockMethod MTHD_MKDIR

MTHD_OPEN_DATA_INPUT_STREAM

public static final MockMethod MTHD_OPEN_DATA_INPUT_STREAM

MTHD_OPEN_DATA_OUTPUT_STREAM

public static final MockMethod MTHD_OPEN_DATA_OUTPUT_STREAM

MTHD_OPEN_INPUT_STREAM

public static final MockMethod MTHD_OPEN_INPUT_STREAM

MTHD_OPEN_OUTPUT_STREAM

public static final MockMethod MTHD_OPEN_OUTPUT_STREAM

MTHD_OPEN_OUTPUT_STREAM_$_LONG

public static final MockMethod MTHD_OPEN_OUTPUT_STREAM_$_LONG

MTHD_RENAME_$_STRING

public static final MockMethod MTHD_RENAME_$_STRING

MTHD_SET_FILE_CONNECTION_$_STRING

public static final MockMethod MTHD_SET_FILE_CONNECTION_$_STRING

MTHD_SET_HIDDEN_$_BOOLEAN

public static final MockMethod MTHD_SET_HIDDEN_$_BOOLEAN

MTHD_SET_READABLE_$_BOOLEAN

public static final MockMethod MTHD_SET_READABLE_$_BOOLEAN

MTHD_SET_WRITABLE_$_BOOLEAN

public static final MockMethod MTHD_SET_WRITABLE_$_BOOLEAN

MTHD_TOTAL_SIZE

public static final MockMethod MTHD_TOTAL_SIZE

MTHD_TRUNCATE_$_LONG

public static final MockMethod MTHD_TRUNCATE_$_LONG

MTHD_USED_SIZE

public static final MockMethod MTHD_USED_SIZE
Constructor Detail

MockFileConnection

public MockFileConnection()

MockFileConnection

public MockFileConnection(IInvocationHandler handler)
Method Detail

availableSize

public long availableSize()
Specified by:
availableSize in interface javax.microedition.io.file.FileConnection

canRead

public boolean canRead()
Specified by:
canRead in interface javax.microedition.io.file.FileConnection

canWrite

public boolean canWrite()
Specified by:
canWrite in interface javax.microedition.io.file.FileConnection

close

public void close()
           throws java.io.IOException
Specified by:
close in interface javax.microedition.io.Connection
Throws:
java.io.IOException

create

public void create()
            throws java.io.IOException
Specified by:
create in interface javax.microedition.io.file.FileConnection
Throws:
java.io.IOException

delete

public void delete()
            throws java.io.IOException
Specified by:
delete in interface javax.microedition.io.file.FileConnection
Throws:
java.io.IOException

directorySize

public long directorySize(boolean arg0)
                   throws java.io.IOException
Specified by:
directorySize in interface javax.microedition.io.file.FileConnection
Throws:
java.io.IOException

exists

public boolean exists()
Specified by:
exists in interface javax.microedition.io.file.FileConnection

fileSize

public long fileSize()
              throws java.io.IOException
Specified by:
fileSize in interface javax.microedition.io.file.FileConnection
Throws:
java.io.IOException

getName

public java.lang.String getName()
Specified by:
getName in interface javax.microedition.io.file.FileConnection

getPath

public java.lang.String getPath()
Specified by:
getPath in interface javax.microedition.io.file.FileConnection

getURL

public java.lang.String getURL()
Specified by:
getURL in interface javax.microedition.io.file.FileConnection

isDirectory

public boolean isDirectory()
Specified by:
isDirectory in interface javax.microedition.io.file.FileConnection

isHidden

public boolean isHidden()
Specified by:
isHidden in interface javax.microedition.io.file.FileConnection

isOpen

public boolean isOpen()
Specified by:
isOpen in interface javax.microedition.io.file.FileConnection

lastModified

public long lastModified()
Specified by:
lastModified in interface javax.microedition.io.file.FileConnection

list

public java.util.Enumeration list()
                           throws java.io.IOException
Specified by:
list in interface javax.microedition.io.file.FileConnection
Throws:
java.io.IOException

list

public java.util.Enumeration list(java.lang.String arg0,
                                  boolean arg1)
                           throws java.io.IOException
Specified by:
list in interface javax.microedition.io.file.FileConnection
Throws:
java.io.IOException

mkdir

public void mkdir()
           throws java.io.IOException
Specified by:
mkdir in interface javax.microedition.io.file.FileConnection
Throws:
java.io.IOException

openDataInputStream

public java.io.DataInputStream openDataInputStream()
                                            throws java.io.IOException
Specified by:
openDataInputStream in interface javax.microedition.io.file.FileConnection
Specified by:
openDataInputStream in interface javax.microedition.io.InputConnection
Throws:
java.io.IOException

openDataOutputStream

public java.io.DataOutputStream openDataOutputStream()
                                              throws java.io.IOException
Specified by:
openDataOutputStream in interface javax.microedition.io.file.FileConnection
Specified by:
openDataOutputStream in interface javax.microedition.io.OutputConnection
Throws:
java.io.IOException

openInputStream

public java.io.InputStream openInputStream()
                                    throws java.io.IOException
Specified by:
openInputStream in interface javax.microedition.io.file.FileConnection
Specified by:
openInputStream in interface javax.microedition.io.InputConnection
Throws:
java.io.IOException

openOutputStream

public java.io.OutputStream openOutputStream()
                                      throws java.io.IOException
Specified by:
openOutputStream in interface javax.microedition.io.file.FileConnection
Specified by:
openOutputStream in interface javax.microedition.io.OutputConnection
Throws:
java.io.IOException

openOutputStream

public java.io.OutputStream openOutputStream(long arg0)
                                      throws java.io.IOException
Specified by:
openOutputStream in interface javax.microedition.io.file.FileConnection
Throws:
java.io.IOException

rename

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

setFileConnection

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

setHidden

public void setHidden(boolean arg0)
               throws java.io.IOException
Specified by:
setHidden in interface javax.microedition.io.file.FileConnection
Throws:
java.io.IOException

setReadable

public void setReadable(boolean arg0)
                 throws java.io.IOException
Specified by:
setReadable in interface javax.microedition.io.file.FileConnection
Throws:
java.io.IOException

setWritable

public void setWritable(boolean arg0)
                 throws java.io.IOException
Specified by:
setWritable in interface javax.microedition.io.file.FileConnection
Throws:
java.io.IOException

totalSize

public long totalSize()
Specified by:
totalSize in interface javax.microedition.io.file.FileConnection

truncate

public void truncate(long arg0)
              throws java.io.IOException
Specified by:
truncate in interface javax.microedition.io.file.FileConnection
Throws:
java.io.IOException

usedSize

public long usedSize()
Specified by:
usedSize in interface javax.microedition.io.file.FileConnection