The createResponse() method accepts an integer which is the response status as well as a string, representing the reason phrase. If no reason is specified, the component will use the default ones as suggested by the HTTP RFCs.
If a size is not provided it will be determined by checking the size of the stream. The $error is the PHP file upload error, It defaults to 0. If provided by the client, you can use the clientFilename and clientMediaType. Otherwise they can be set to null.