Reuse input stream to output stream copy method

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Deduplicate code for relocating java files regarding to package

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Drop superfluous checks

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Deduplicate for lower casing a file extension

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Deduplicate file upload handling code

Signed-off-by: Sven Strickroth <email@cs-ware.de>